2 /* { dg-do compile } */
3 /* { dg-options "-Wmultistatement-macros" } */
7 #define BAD4 i++; i++ /* { dg-warning "macro expands to multiple statements" } */
8 #define BAD5 i++; i++ /* { dg-warning "macro expands to multiple statements" } */
9 #define BAD6 i++; i++ /* { dg-warning "macro expands to multiple statements" } */
10 #define BAD7 i++; i++ /* { dg-warning "macro expands to multiple statements" } */
11 #define BAD8 i++; i++ /* { dg-warning "macro expands to multiple statements" } */
12 #define BAD9 i++; i++ /* { dg-warning "macro expands to multiple statements" } */
13 #define IF if (1) /* { dg-message "not guarded by this 'if' clause" } */
14 #define IF2 IF /* { dg-message "in expansion of macro .IF." } */
15 #define BADB7 BAD7 /* { dg-message "in expansion of macro .BAD7." } */
16 #define BADB8 BAD8 /* { dg-message "in expansion of macro .BAD8." } */
17 #define BADB9 BAD9 /* { dg-message "in expansion of macro .BAD9." } */
52 #define TOP2 FN4 /* { dg-message "in expansion of macro .FN4." } */
56 IF2 /* { dg-message "in expansion of macro .IF2." } */ \
57 BAD4; /* { dg-message "in expansion of macro .BAD4." } */ \
63 IF /* { dg-message "in expansion of macro .IF." } */ \
64 BAD5; /* { dg-message "in expansion of macro .BAD5." } */ \
70 if (1) /* { dg-message "not guarded by this 'if' clause" } */ \
71 BAD6; /* { dg-message "in expansion of macro .BAD6." } */ \
77 if (1) /* { dg-message "not guarded by this 'if' clause" } */ \
78 BADB7; /* { dg-message "in expansion of macro .BADB7." } */ \
84 IF2 /* { dg-message "in expansion of macro .IF2." } */ \
85 BADB8; /* { dg-message "in expansion of macro .BADB8." } */ \
91 IF /* { dg-message "in expansion of macro .IF." } */ \
92 BADB9; /* { dg-message "in expansion of macro .BADB9." } */ \
99 TOP2
/* { dg-message "in expansion of macro .TOP2." } */
100 FN5
/* { dg-message "in expansion of macro .FN5." } */
101 FN6
/* { dg-message "in expansion of macro .FN6." } */
102 FN7
/* { dg-message "in expansion of macro .FN7." } */
103 FN8
/* { dg-message "in expansion of macro .FN8." } */
104 FN9
/* { dg-message "in expansion of macro .FN9." } */