1 /* { dg-options "-Wuninitialized" } */
3 /* Verify disabling a warning, where both the _Pragma and the
4 affected code are within (different) macros. */
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 #define WARNABLE_CODE *++yyvsp = yylval; /* { dg-bogus "used uninitialized" } */
15 void test (char yylval
)
17 char *yyvsp
; /* { dg-bogus "declared here" } */
18 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
20 YY_IGNORE_MAYBE_UNINITIALIZED_END