mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 20:33:03 +00:00
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:
@@ -1,3 +1,12 @@
|
|||||||
|
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>
|
2011-08-21 Joel E. Denny <joeldenny@joeldenny.org>
|
||||||
|
|
||||||
tests: fix empty unions.
|
tests: fix empty unions.
|
||||||
|
|||||||
@@ -82,10 +82,9 @@ if test "${enableval}" = yes; then
|
|||||||
AC_SUBST([WARN_CFLAGS])
|
AC_SUBST([WARN_CFLAGS])
|
||||||
# Warnings for the test suite only.
|
# Warnings for the test suite only.
|
||||||
gl_WARN_ADD([-Wundef], [WARN_CFLAGS_TEST])
|
gl_WARN_ADD([-Wundef], [WARN_CFLAGS_TEST])
|
||||||
WARN_CXXFLAGS_TEST="$WARN_CXXFLAGS $WARN_CFLAGS_TEST"
|
gl_WARN_ADD([-pedantic], [WARN_CFLAGS_TEST])
|
||||||
WARN_CFLAGS_TEST="$WARN_CFLAGS $WARN_CFLAGS_TEST"
|
AC_SUBST([WARN_CXXFLAGS_TEST], ["$WARN_CXXFLAGS $WARN_CFLAGS_TEST"])
|
||||||
AC_SUBST([WARN_CXXFLAGS_TEST])
|
AC_SUBST([WARN_CFLAGS_TEST], ["$WARN_CFLAGS $WARN_CFLAGS_TEST"])
|
||||||
AC_SUBST([WARN_CFLAGS_TEST])
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
BISON_TEST_FOR_WORKING_C_COMPILER
|
BISON_TEST_FOR_WORKING_C_COMPILER
|
||||||
|
|||||||
@@ -88,6 +88,7 @@ m4_define([AT_TEST_SYNCLINE],
|
|||||||
|
|
||||||
AT_DATA([syncline.c],
|
AT_DATA([syncline.c],
|
||||||
[[#error "1"
|
[[#error "1"
|
||||||
|
int i; // avoids -pedantic warning about an empty translation unit
|
||||||
]])
|
]])
|
||||||
|
|
||||||
AT_SYNCLINES_COMPILE([syncline.c])
|
AT_SYNCLINES_COMPILE([syncline.c])
|
||||||
|
|||||||
Reference in New Issue
Block a user