Add gcc's -Wundef to test suite and fix another warning from it.

* NEWS (2.4.2): Update description of -Wundef fix.
* configure.ac (WARN_CXXFLAGS_TEST): New substitution.
(WARN_CFLAGS_TEST): New substitution.
* data/glr.c: Avoid warning about __STRICT_ANSI__.
* tests/atlocal.in (CFLAGS): Use WARN_CFLAGS_TEST instead of
WARN_CFLAGS.
(NO_WERROR_CFLAGS): Likewise.
(CXXFLAGS): Use WARN_CXXFLAGS_TEST instead of WARN_CXXFLAGS.
This commit is contained in:
Joel E. Denny
2009-12-16 13:19:19 -05:00
parent 19750d310c
commit a603c6e0bb
5 changed files with 26 additions and 6 deletions

View File

@@ -68,6 +68,12 @@ if test "${enableval}" = yes; then
gl_WARN_ADD([-Wshadow])
gl_WARN_ADD([-Wstrict-prototypes])
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])
AC_DEFINE([lint], 1, [Define to 1 if the compiler is checking for lint.])
fi