testsuite: Skip analyzer tests on AIX.
[official-gcc.git] / gcc / testsuite / c-c++-common / Wmisleading-indentation-5.c
blob12b53569ba7570c979246f4391901131523eefe4
1 /* PR c/80076 */
2 /* { dg-options "-Wmisleading-indentation" } */
4 void foo(void);
6 void test01(int flag) {
7 #define bar() foo() /* { dg-message "this statement" } */
8 if (flag) /* { dg-warning "does not guard" } */
9 foo();
10 bar(); /* { dg-message "in expansion of macro" } */
11 #undef bar
14 void test02(int flag) {
15 #define bar() foo()
16 if (flag) /* { dg-warning "does not guard" } */
17 bar();
18 foo(); /* { dg-message "this statement" } */
19 #undef bar
22 void test03(int flag) {
23 #define bar() foo() /* { dg-message "this statement" } */
24 if (flag) /* { dg-warning "does not guard" } */
25 bar();
26 bar(); /* { dg-message "in expansion of macro" } */
27 #undef bar
30 void test04(int flag, int num) {
31 #define bar() \
32 { \
33 if (flag) \
34 num = 0; \
35 num = 1; \
37 bar();
38 /* { dg-warning "does not guard" "" { target *-*-* } .-5 } */
39 /* { dg-message "this statement" "" { target *-*-* } .-4 } */
40 #undef bar
43 void test05(int flag, int num) {
44 #define baz() (num = 1)
45 #define bar() \
46 { \
47 if (flag) \
48 num = 0; \
49 baz(); \
51 #define wrapper bar
52 wrapper();
53 /* { dg-warning "does not guard" "" { target *-*-* } .-6 } */
54 /* { dg-message "this statement" "" { target *-*-* } .-10 } */
55 #undef bar