Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/c-c++-common/pr69558-4.c @ 111:04ced10e8804
gcc 7
author | kono |
---|---|
date | Fri, 27 Oct 2017 22:46:09 +0900 |
parents | |
children |
rev | line source |
---|---|
111 | 1 /* PR c/69558 */ |
2 /* { dg-do compile } */ | |
3 /* { dg-options "-Wdeprecated-declarations" } */ | |
4 | |
5 /* Verify disabling -Wdeprecated-declarations, where the _Pragma and the | |
6 affected code are in different macros. */ | |
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 #define C \ | |
14 foo (); | |
15 | |
16 __attribute__((deprecated)) void foo (void); | |
17 | |
18 void bar (void) | |
19 { | |
20 A | |
21 C | |
22 B | |
23 } |