Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/c-c++-common/Wmultistatement-macros-5.c @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | 04ced10e8804 |
children |
rev | line source |
---|---|
111 | 1 /* PR c/80116 */ |
2 /* { dg-options "-Wmultistatement-macros" } */ | |
3 /* { dg-do compile } */ | |
4 | |
5 #define M(N) \ | |
6 L ## N: \ | |
7 x++; x++ /* { dg-warning "macro expands to multiple statements" } */ | |
8 | |
9 int x, y, tmp; | |
10 | |
11 void | |
12 fn1 (void) | |
13 { | |
14 if (x) /* { dg-message "not guarded by this 'if' clause" } */ | |
15 M (0); /* { dg-message "in expansion of macro .M." } */ | |
16 if (x) /* { dg-message "not guarded by this 'if' clause" } */ | |
17 M (1); /* { dg-message "in expansion of macro .M." } */ | |
18 } |