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.
(cherry picked from commit 5422d56a71)
This commit is contained in:
Joel E. Denny
2011-08-21 13:07:16 -04:00
parent 765e1bd4fc
commit d63311dfb9
3 changed files with 13 additions and 4 deletions

View File

@@ -82,10 +82,9 @@ if test "${enableval}" = yes; then
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