Hello, I've just bootstrapped, configured with --enable-gcc-warnings, built and run "make check" on Fedora 15 (i.e., gcc version 4.6.0 20110413) I was surprised to see so many failures (abbreviated output below).
However, they're all due to one newly-enabled gcc warning: note the [-Werror=unused-but-set-variable] in every case below. At first I tried to turn off only that one new warning, but -Wno-unused-but-set-variable had no effect, so I resorted to -Wno-unused. In case you want precisely that change, here's a patch. With this, all of the tests passed. From de66004f2a397ee0297196499bdf8e71c09418ba Mon Sep 17 00:00:00 2001 From: Jim Meyering <[email protected]> Date: Sat, 16 Apr 2011 11:33:15 +0200 Subject: [PATCH] avoid spurious test failures due to new gcc warnings * configure.ac (WARN_CFLAGS_TEST): Disable -Wunused, to avoid many spurious test failures when using gcc-4.6.0 and when configured with --enable-gcc-warnings. --- ChangeLog | 7 +++++++ configure.ac | 1 + 2 files changed, 8 insertions(+), 0 deletions(-) diff --git a/ChangeLog b/ChangeLog index 84bc913..4a59dae 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2011-04-16 Jim Meyering <[email protected]> + + avoid spurious test failures due to new gcc warnings + * configure.ac (WARN_CFLAGS_TEST): Disable -Wunused, to + avoid many spurious test failures when using gcc-4.6.0 + and when configured with --enable-gcc-warnings. + 2011-04-09 Joel E. Denny <[email protected]> Fix missing updates to GPLv3. diff --git a/configure.ac b/configure.ac index 39d4257..1a612fc 100644 --- a/configure.ac +++ b/configure.ac @@ -80,6 +80,7 @@ if test "${enableval}" = yes; then AC_SUBST([WARN_CFLAGS]) # Warnings for the test suite only. gl_WARN_ADD([-Wundef], [WARN_CFLAGS_TEST]) + gl_WARN_ADD([-Wno-unused], [WARN_CFLAGS_TEST]) WARN_CXXFLAGS_TEST="$WARN_CXXFLAGS $WARN_CFLAGS_TEST" WARN_CFLAGS_TEST="$WARN_CFLAGS $WARN_CFLAGS_TEST" AC_SUBST([WARN_CXXFLAGS_TEST]) -- 1.7.5.rc1.228.g86d60b ## ----------------------------------- ## ## GNU Bison 2.4.588-2f658 test suite. ## ## ----------------------------------- ## ... ERROR: All 316 tests were run, 38 failed unexpectedly. ## ------------------------ ## ## Summary of the failures. ## ## ------------------------ ## Failed tests: GNU Bison 2.4.588-2f658 test suite test groups: NUM: FILE-NAME:LINE TEST-GROUP-NAME KEYWORDS 74: output.at:225 Output file name: `~!@#$%^&*()-=_+{}[]|\: <>, .' 75: output.at:232 Output file name: ( c++ 76: output.at:233 Output file name: ) c++ 77: output.at:234 Output file name: # c++ 78: output.at:235 Output file name: @@ c++ 79: output.at:236 Output file name: @{ c++ 80: output.at:237 Output file name: @} c++ 81: output.at:238 Output file name: [ c++ 82: output.at:239 Output file name: ] c++ 141: actions.at:1190 Default %printer and %destructor for mid-rule values 149: conflicts.at:151 parse.error=verbose and consistent errors glr c++ java 185: calc.at:649 Calculator %glr-parser glr 186: calc.at:651 Calculator %glr-parser %defines glr 188: calc.at:653 Calculator %glr-parser %name-prefix "calc" glr 189: calc.at:654 Calculator %glr-parser %verbose glr 190: calc.at:655 Calculator %glr-parser %yacc glr 191: calc.at:656 Calculator %glr-parser %define parse.error verbose glr 195: calc.at:663 Calculator %glr-parser %debug glr 247: regression.at:941 Dancer %glr-parser glr 250: regression.at:1037 Expecting two tokens %glr-parser glr 287: cxx-type.at:413 GLR: Resolve ambiguity, impure, no locations 289: cxx-type.at:426 GLR: Resolve ambiguity, pure, no locations 291: cxx-type.at:440 GLR: Merge conflicting parses, impure, no locations 293: cxx-type.at:454 GLR: Merge conflicting parses, pure, no locations 295: cxx-type.at:467 GLR: Verbose messages, resolve ambiguity, impure, no locations 296: glr-regression.at:25 Badly Collapsed GLR States 297: glr-regression.at:120 Improper handling of embedded actions and dollar(-N) in GLR parsers 298: glr-regression.at:239 Improper merging of GLR delayed action sets 299: glr-regression.at:348 Duplicate representation of merged trees 300: glr-regression.at:451 User destructor for unresolved GLR semantic value 301: glr-regression.at:524 User destructor after an error during a split parse 302: glr-regression.at:591 Duplicated user destructor for lookahead 304: glr-regression.at:781 No users destructors if stack 0 deleted 305: glr-regression.at:861 Corrupted semantic options if user action cuts parse 306: glr-regression.at:926 Undesirable destructors if user action cuts parse 307: glr-regression.at:995 Leaked semantic values if user action cuts parse 310: glr-regression.at:1484 Leaked semantic values when reporting ambiguity 311: glr-regression.at:1577 Leaked lookahead after nondeterministic parse syntax error ## ---------------------- ## ## Detailed failed tests. ## ## ---------------------- ## # -*- compilation -*- 74. output.at:225: testing Output file name: `~!@#$%^&*()-=_+{}[]|\:;<>, .' ... ./output.at:225: touch "\`~!@#\$%^&*()-=_+{}[]|\\:;<>, .'.tmp" || exit 77 ./output.at:225: bison -o "\`~!@#\$%^&*()-=_+{}[]|\\:;<>, .'.c" --defines="\`~!@#\$%^&*()-=_+{}[]|\\:;<>, .'.h" glr.y ./output.at:225: ls "\`~!@#\$%^&*()-=_+{}[]|\\:;<>, .'.c" "\`~!@#\$%^&*()-=_+{}[]|\\:;<>, .'.h" stdout: `~!@#$%^&*()-=_+{}[]|\:;<>, .'.c `~!@#$%^&*()-=_+{}[]|\:;<>, .'.h ./output.at:225: $CC $CFLAGS $CPPFLAGS -o glr.o -c "\`~!@#\$%^&*()-=_+{}[]|\\:;<>, .'.c" stderr: `~!@#$%^&*()-=_+{}[]|\:;<>, .'.c: In function 'yyresolveLocations': `~!@#$%^&*()-=_+{}[]|\:;<>, .'.c:1729:19: error: variable 'yyrhsloc' set but not used [-Werror=unused-but-set-variable] cc1: all warnings being treated as errors stdout: ./output.at:225: exit code was 1, expected 0 74. output.at:225: 74. Output file name: `~!@#$%^&*()-=_+{}[]|\:;<>, .' (output.at:225): FAILED (output.at:225) # -*- compilation -*- 75. output.at:232: testing Output file name: ( ... ./output.at:232: touch "(.tmp" || exit 77 ./output.at:232: bison -o "(.c" --defines="(.h" glr.y ./output.at:232: ls "(.c" "(.h" stdout: (.c (.h ./output.at:232: $CC $CFLAGS $CPPFLAGS -o glr.o -c "(.c" stderr: (.c: In function 'yyresolveLocations': (.c:1729:19: error: variable 'yyrhsloc' set but not used [-Werror=unused-but-set-variable] cc1: all warnings being treated as errors stdout: ./output.at:232: exit code was 1, expected 0 75. output.at:232: 75. Output file name: ( (output.at:232): FAILED (output.at:232) # -*- compilation -*- 76. output.at:233: testing Output file name: ) ... ./output.at:233: touch ").tmp" || exit 77 ./output.at:233: bison -o ").c" --defines=").h" glr.y ./output.at:233: ls ").c" ").h" stdout: ).c ).h ./output.at:233: $CC $CFLAGS $CPPFLAGS -o glr.o -c ").c" stderr: ).c: In function 'yyresolveLocations': ).c:1729:19: error: variable 'yyrhsloc' set but not used [-Werror=unused-but-set-variable] cc1: all warnings being treated as errors stdout: ./output.at:233: exit code was 1, expected 0 76. output.at:233: 76. Output file name: ) (output.at:233): FAILED (output.at:233) # -*- compilation -*- ...
