mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-16 15:53:03 +00:00
tests: disable GCC7 warnings for some tests
With GCC7 we have warnings (false positive):
x8.c: In function 'x8_parse':
x8.c:1233:16: error: 'yylval' may be used uninitialized in this function [-Werror=maybe-uninitialized]
yylval = *yypushed_val;
~~~~~~~^~~~~~~~~~~~~~~
x8.c: In function 'x8_pull_parse':
x8.c:1233:16: error: 'yylval' may be used uninitialized in this function [-Werror=maybe-uninitialized]
yylval = *yypushed_val;
~~~~~~~^~~~~~~~~~~~~~~
See also 9645a2b20e.
* tests/local.at (AT_PUSH_IF): New.
(AT_BISON_OPTION_POPDEFS): Pop it, and pop AT_PURE_IF.
* tests/headers.at (Several parsers, Several parsers): Disable these
warnings when in push parser.
This commit is contained in:
@@ -111,8 +111,8 @@ AT_CLEANUP
|
||||
## Sane headers. ##
|
||||
## -------------- ##
|
||||
|
||||
# AT_TEST([DIRECTIVES])
|
||||
# ---------------------
|
||||
# AT_TEST([DIRECTIVES], [COMPILER-FLAGS])
|
||||
# ---------------------------------------
|
||||
# Check that headers are self-contained and protected againt multiple
|
||||
# inclusions.
|
||||
|
||||
@@ -125,7 +125,11 @@ AT_DATA_GRAMMAR([input.y],
|
||||
%error-verbose
|
||||
]AT_VARIANT_IF([], [%union {int integer;}])[
|
||||
%code {
|
||||
#include <stdio.h>
|
||||
]AT_PUSH_IF([[
|
||||
#if defined __GNUC__ && 7 == __GNUC__
|
||||
# pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
|
||||
#endif
|
||||
]])[
|
||||
]AT_YYERROR_DECLARE[
|
||||
]AT_YYLEX_DECLARE[
|
||||
}
|
||||
@@ -206,7 +210,11 @@ $2
|
||||
int integer;
|
||||
}
|
||||
%{
|
||||
#include <stdio.h>
|
||||
]AT_PUSH_IF([[
|
||||
#if defined __GNUC__ && 7 == __GNUC__
|
||||
# pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
|
||||
#endif
|
||||
]])[
|
||||
]AT_YYERROR_DECLARE[
|
||||
]AT_YYLEX_DECLARE[
|
||||
%}
|
||||
|
||||
Reference in New Issue
Block a user