c-family: Add -Wmisleading-indentation testcase [PR71637]

We no longer emit a bogus warning for the below testcase after
r11-3266-g4839de55e2c986.

	PR c++/71637

gcc/testsuite/ChangeLog:

	* c-c++-common/Wmisleading-indentation-6.c: New test.
This commit is contained in:
Patrick Palka 2022-03-29 13:44:05 -04:00
parent 9f9ccc4a57
commit 89976d0824

View File

@ -0,0 +1,11 @@
/* PR c++/71637 */
/* { dg-options "-ftrack-macro-expansion=0 -Wmisleading-indentation" } */
#define m(x) ({ int y; if (x) y=0; else y=1; y; })
int main()
{
int x =
m(0);
return x;
}