summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAkim Demaille <akim.demaille@gmail.com>2019-10-20 13:55:36 +0200
committerAkim Demaille <akim.demaille@gmail.com>2019-10-20 23:01:27 +0200
commit41b1f828ae39518d75948035c99ba053bc402752 (patch)
tree5ce657dd2e471f11c2bd89578ad5d3184c6ee34d /tests
parent4e0de4df8c5adc82f80e159d9ba8fbb25c043a36 (diff)
downloadbison-41b1f828ae39518d75948035c99ba053bc402752.tar.gz
tests: beware of GCC9 warnings in push mode
This is really weird: GCC points to the LHS of the assignment... 260. headers.at:184: testing Sane headers: api.pure api.push-pull=both ... tests/headers.at:184: COLUMNS=1000; export COLUMNS; bison --color=no -fno-caret -d -o input.c input.y tests/headers.at:184: $CC $CFLAGS $CPPFLAGS -c -o input.o input.c stderr: input.c: In function 'yyparse': input.c:1276:16: error: 'yylval' may be used uninitialized in this function [-Werror=maybe-uninitialized] 1276 | yylval = *yypushed_val; | ~~~~~~~^~~~~~~~~~~~~~~ input.c: In function 'yypull_parse': input.c:1276:16: error: 'yylval' may be used uninitialized in this function [-Werror=maybe-uninitialized] 1276 | yylval = *yypushed_val; | ~~~~~~~^~~~~~~~~~~~~~~ cc1: all warnings being treated as errors stdout: tests/headers.at:184: exit code was 1, expected 0 See also d87c8ac79ab844d6a7a4f5103dcf7a842d18b611 and 9645a2b20ee7cbfa8bb4ac2237f87d598afe349c. * tests/headers.at (Several parsers, Several parsers): Disable these warnings when in push parser.
Diffstat (limited to 'tests')
-rw-r--r--tests/headers.at4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/headers.at b/tests/headers.at
index 390dfa4c..11d60f16 100644
--- a/tests/headers.at
+++ b/tests/headers.at
@@ -129,7 +129,7 @@ AT_DATA_GRAMMAR([input.y],
%code {
#include <stdio.h> /* printf. */
]AT_PUSH_IF([[
-#if defined __GNUC__ && 7 == __GNUC__
+#if defined __GNUC__ && (7 == __GNUC__ || 9 == __GNUC__)
# pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
#endif
]])[
@@ -215,7 +215,7 @@ $2
%{
#include <stdio.h> /* printf. */
]AT_PUSH_IF([[
-#if defined __GNUC__ && 7 == __GNUC__
+#if defined __GNUC__ && (7 == __GNUC__ || 9 == __GNUC__)
# pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
#endif
]])[