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.
(cherry picked from commit a603c6e0bb)
This commit is contained in:
Joel E. Denny
2009-12-16 13:19:19 -05:00
parent 3bba2dadae
commit 3473147172
5 changed files with 26 additions and 6 deletions

View File

@@ -310,7 +310,8 @@ b4_percent_code_get[]dnl
#ifndef __attribute__
/* This feature is available in gcc versions 2.5 and later. */
# if (! defined __GNUC__ || __GNUC__ < 2 \
|| (__GNUC__ == 2 && __GNUC_MINOR__ < 5) || __STRICT_ANSI__)
|| (__GNUC__ == 2 && __GNUC_MINOR__ < 5) \
|| (defined __STRICT_ANSI__ && __STRICT_ANSI__))
# define __attribute__(Spec) /* empty */
# endif
#endif