annotate gcc/testsuite/c-c++-common/pr69558-3.c @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 /* PR c/69558 */
kono
parents:
diff changeset
2 /* { dg-do compile } */
kono
parents:
diff changeset
3 /* { dg-options "-Wdeprecated-declarations" } */
kono
parents:
diff changeset
4
kono
parents:
diff changeset
5 /* Verify disabling -Wdeprecated-declarations, where the _Pragma is not
kono
parents:
diff changeset
6 in a macro, but the affected code *is*. */
kono
parents:
diff changeset
7
kono
parents:
diff changeset
8 #define C \
kono
parents:
diff changeset
9 foo ();
kono
parents:
diff changeset
10
kono
parents:
diff changeset
11 __attribute__((deprecated)) void foo (void);
kono
parents:
diff changeset
12
kono
parents:
diff changeset
13 void bar (void)
kono
parents:
diff changeset
14 {
kono
parents:
diff changeset
15 _Pragma ("GCC diagnostic push")
kono
parents:
diff changeset
16 _Pragma ("GCC diagnostic ignored \"-Wdeprecated-declarations\"")
kono
parents:
diff changeset
17 C
kono
parents:
diff changeset
18 _Pragma ("GCC diagnostic pop")
kono
parents:
diff changeset
19 }