From d63311dfb967f077bde57ee34e72604edbde80ab Mon Sep 17 00:00:00 2001 From: "Joel E. Denny" Date: Sun, 21 Aug 2011 13:07:16 -0400 Subject: 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 5422d56a718805a2470558808355e04182a12d65) --- ChangeLog | 9 +++++++++ configure.ac | 7 +++---- tests/synclines.at | 1 + 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3da26ebc..ced339c8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2011-08-21 Joel E. Denny + + 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 tests: fix empty unions. diff --git a/configure.ac b/configure.ac index 258e6bb1..a98bc952 100644 --- a/configure.ac +++ b/configure.ac @@ -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 diff --git a/tests/synclines.at b/tests/synclines.at index cc2a7229..42b2a667 100644 --- a/tests/synclines.at +++ b/tests/synclines.at @@ -88,6 +88,7 @@ m4_define([AT_TEST_SYNCLINE], AT_DATA([syncline.c], [[#error "1" +int i; // avoids -pedantic warning about an empty translation unit ]]) AT_SYNCLINES_COMPILE([syncline.c]) -- cgit v1.2.1