Mercurial > hg > CbC > CbC_gcc
comparison gcc/testsuite/c-c++-common/pr69543-3.c @ 111:04ced10e8804
gcc 7
author | kono |
---|---|
date | Fri, 27 Oct 2017 22:46:09 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
68:561a7518be6b | 111:04ced10e8804 |
---|---|
1 /* { dg-options "-Wuninitialized" } */ | |
2 | |
3 /* Verify disabling a warning, where the _Pragma is in regular code, | |
4 but the affected code is within a macro. */ | |
5 | |
6 /* TODO: XFAIL: both C and C++ erroneously fail to suppress the warning | |
7 The warning is reported at the macro definition location, rather than | |
8 the macro expansion location. */ | |
9 | |
10 #define WARNABLE_CODE *++yyvsp = yylval; /* { dg-bogus "used uninitialized" "" { xfail *-*-* } } */ | |
11 | |
12 void test (char yylval) | |
13 { | |
14 char *yyvsp; /* { dg-bogus "declared here" "" { xfail *-*-* } } */ | |
15 _Pragma ("GCC diagnostic push") | |
16 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") | |
17 _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") | |
18 WARNABLE_CODE | |
19 _Pragma ("GCC diagnostic pop") | |
20 } |