summaryrefslogtreecommitdiff
path: root/gcc/testsuite/c-c++-common/pr69558-1.c
blob: 57ac4904d3120ffda431f7be779e396b99e69604 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/* PR c/69558 */
/* { dg-do compile } */
/* { dg-options "-Wdeprecated-declarations" } */

/* Verify disabling -Wdeprecated-declarations, where the _Pragma is in a
   macro, but the affected code is *not* in a macro.  */

#define A \
  _Pragma ("GCC diagnostic push") \
  _Pragma ("GCC diagnostic ignored \"-Wdeprecated-declarations\"")
#define B \
  _Pragma ("GCC diagnostic pop")

__attribute__((deprecated)) void foo (void);

void bar (void)
{
  A
  foo ();
  B
}