| 1 |
/* PR c/69558 */ |
| 2 |
/* { dg-do compile } */ |
| 3 |
/* { dg-options "-Wdeprecated-declarations" } */ |
| 4 |
|
| 5 |
/* TODO: XFAIL for g++ (works for C). */ |
| 6 |
|
| 7 |
#define A \ |
| 8 |
_Pragma ("GCC diagnostic push") \ |
| 9 |
_Pragma ("GCC diagnostic ignored \"-Wdeprecated-declarations\"") |
| 10 |
#define B \ |
| 11 |
_Pragma ("GCC diagnostic pop") |
| 12 |
#define C(x) \ |
| 13 |
A \ |
| 14 |
static inline void bar (void) { x (); } /* { dg-bogus "in definition of|deprecated" "" } */ \ |
| 15 |
B |
| 16 |
|
| 17 |
__attribute__((deprecated)) void foo (void); /* { dg-bogus "declared here" "" } */ |
| 18 |
|
| 19 |
C (foo) /* { dg-bogus "is deprecated" } */ |