PR middle-end/77357 - strlen of constant strings not folded
[official-gcc.git] / gcc / testsuite / gcc.dg / pragma-diag-7.c
blob3862e9ba1aef39b718280d807e7141b44645bdb5
1 /* { dg-do compile } */
3 unsigned long ok = 0UL;
4 #pragma GCC diagnostic push
5 #pragma GCC diagnostic warning "-Wtraditional"
6 unsigned long bad = 1UL; /* { dg-warning "suffix" } */
7 /* Note the extra space before the pragma on this next line: */
8 #pragma GCC diagnostic pop
9 unsigned long ok_again = 2UL; /* { dg-bogus "suffix" } */
11 /* Redundant with the previous pop, but just shows that it fails to stop the
12 * following warning with an unpatched GCC: */
13 #pragma GCC diagnostic ignored "-Wtraditional"
15 /* { dg-bogus "would be stringified" "" { target *-*-* } .+1 } */
16 #define UNW_DEC_PROLOGUE(fmt, body, rlen, arg) \
17 do { \
18 unw_rlen = rlen; \
19 *(int *)arg = body; \
20 printf(" %s:%s(rlen=%lu)\n", \
21 fmt, (body ? "body" : "prologue"), (unsigned long)rlen); \
22 } while (0)