Debian Codegraph @

gcc/testsuite/c-c++-common/cpp/diagnostic-pragma-2.c

raw
1 /* { dg-do compile } */
2
3 #define B _Pragma("GCC diagnostic push") \
4 _Pragma("GCC diagnostic ignored \"-Wattributes\"")
5 #define E _Pragma("GCC diagnostic pop")
6
7 #define X() B int __attribute((unknown_attr)) x; E /* { dg-bogus "attribute directive ignored" } */
8 #define Y B int __attribute((unknown_attr)) y; E /* { dg-bogus "attribute directive ignored" } */
9
10 void test1(void)
11 {
12 X() /* { dg-bogus "in expansion of macro" } */
13 Y /* { dg-bogus "in expansion of macro" } */
14 }