This should help to avoid some portability problems. For example,
it would have revealed the empty unions fixed by the last patch
* configure.ac (WARN_CFLAGS_TESTS, WARN_CXXFLAGS_TEST): Implement.
* tests/synclines.at (AT_TEST_SYNCLINE): Avoid -pedantic warning
about an empty translation unit.
(cherry picked from commit
5422d56a718805a2470558808355e04182a12d65)
+2011-08-21 Joel E. Denny <joeldenny@joeldenny.org>
+
+ tests: add -pedantic for --enable-gcc-warnings.
+ This should help to avoid some portability problems. For example,
+ it would have revealed the empty unions fixed by the last patch
+ * configure.ac (WARN_CFLAGS_TESTS, WARN_CXXFLAGS_TEST): Implement.
+ * tests/synclines.at (AT_TEST_SYNCLINE): Avoid -pedantic warning
+ about an empty translation unit.
+
2011-08-21 Joel E. Denny <joeldenny@joeldenny.org>
tests: fix empty unions.
2011-08-21 Joel E. Denny <joeldenny@joeldenny.org>
tests: fix empty unions.
AC_SUBST([WARN_CFLAGS])
# Warnings for the test suite only.
gl_WARN_ADD([-Wundef], [WARN_CFLAGS_TEST])
AC_SUBST([WARN_CFLAGS])
# Warnings for the test suite only.
gl_WARN_ADD([-Wundef], [WARN_CFLAGS_TEST])
- WARN_CXXFLAGS_TEST="$WARN_CXXFLAGS $WARN_CFLAGS_TEST"
- WARN_CFLAGS_TEST="$WARN_CFLAGS $WARN_CFLAGS_TEST"
- AC_SUBST([WARN_CXXFLAGS_TEST])
- AC_SUBST([WARN_CFLAGS_TEST])
+ gl_WARN_ADD([-pedantic], [WARN_CFLAGS_TEST])
+ AC_SUBST([WARN_CXXFLAGS_TEST], ["$WARN_CXXFLAGS $WARN_CFLAGS_TEST"])
+ AC_SUBST([WARN_CFLAGS_TEST], ["$WARN_CFLAGS $WARN_CFLAGS_TEST"])
fi
BISON_TEST_FOR_WORKING_C_COMPILER
fi
BISON_TEST_FOR_WORKING_C_COMPILER
AT_DATA([syncline.c],
[[#error "1"
AT_DATA([syncline.c],
[[#error "1"
+int i; // avoids -pedantic warning about an empty translation unit
]])
AT_SYNCLINES_COMPILE([syncline.c])
]])
AT_SYNCLINES_COMPILE([syncline.c])