re PR c++/70808 (Spurious -Wzero-as-null-pointer-constant for nullptr_t)
[official-gcc.git] / gcc / testsuite / c-c++-common / pr69558.c
blob4c6d498351c3223d39e2f5f7dc77d429e4e44452
1 /* PR c/69558 */
2 /* { dg-do compile } */
3 /* { dg-options "-Wdeprecated-declarations" } */
5 /* TODO: XFAIL for g++ (works for C). */
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" "" { xfail { c++ } } } */ \
17 __attribute__((deprecated)) void foo (void); /* { dg-bogus "declared here" "" { xfail { c++ } } } */
19 C (foo) /* { dg-bogus "is deprecated" } */