1 /* PR c/69558 */
2 /* { dg-do compile } */
3 /* { dg-options "-Wdeprecated-declarations" } */
4
5 /* Verify disabling -Wdeprecated-declarations, where the _Pragma is in a
6 macro, but the affected code is *not* in a macro. */
7
8 #define A \
9 _Pragma ("GCC diagnostic push") \
10 _Pragma ("GCC diagnostic ignored \"-Wdeprecated-declarations\"")
11 #define B \
12 _Pragma ("GCC diagnostic pop")
13
14 __attribute__((deprecated)) void foo (void);
15
bar(void)16 void bar (void)
17 {
18 A
19 foo ();
20 B
21 }
22