| 1 |
/* { dg-do compile } */ |
| 2 |
|
| 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" } */ |
| 10 |
|
| 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" |
| 14 |
|
| 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) |