PR tree-optimization/86401
[official-gcc.git] / gcc / testsuite / c-c++-common / pr69543-1.c
blobbbf4759368b60c04ce11feea06d53bf1598d3a58
1 /* { dg-options "-Wuninitialized" } */
3 /* Verify disabling a warning, where the _Pragma is within
4 a macro, but the affected code is *not* in a macro. */
6 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
7 _Pragma ("GCC diagnostic push") \
8 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\
9 _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
10 # define YY_IGNORE_MAYBE_UNINITIALIZED_END \
11 _Pragma ("GCC diagnostic pop")
13 void test (char yylval)
15 char *yyvsp;
16 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
17 *++yyvsp = yylval;
18 YY_IGNORE_MAYBE_UNINITIALIZED_END