diff options
author | Akim Demaille <akim.demaille@gmail.com> | 2019-10-23 23:10:11 +0200 |
---|---|---|
committer | Akim Demaille <akim.demaille@gmail.com> | 2019-10-24 08:50:14 +0200 |
commit | 76597d01f3edf9330979a4f57b33803d7b97a14d (patch) | |
tree | e92e7b45fbe61cd045a38f4d8e5c581a7b26bca8 /configure.ac | |
parent | bc5efb558dbf88988a12160f8f2e14a4c1726bb1 (diff) | |
download | bison-76597d01f3edf9330979a4f57b33803d7b97a14d.tar.gz |
build: reenable -Wtype-limits
See https://lists.gnu.org/archive/html/bug-bison/2019-10/msg00061.html
to https://lists.gnu.org/archive/html/bug-bison/2019-10/msg00073.html.
Paul Eggert's changes in gnulib do fix the issue for modern GCCs (7,
8, 9) on macOS. Unfortunately these warnings are back on the
CI (GNU/Linux) with GCC 4.6, 4.7, (not 4.8) and 4.9.
Disable the warning locally.
* configure.ac (warn_common, warn_tests): Remove -Wtype-limits.
* src/system.h (IGNORE_TYPE_LIMITS_BEGIN, IGNORE_TYPE_LIMITS_END): New.
* src/InadequacyList.c, src/parse-gram.c, src/parse-gram.y,
* src/symtab.c: Use it.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/configure.ac b/configure.ac index 54963de0..6c62ebe8 100644 --- a/configure.ac +++ b/configure.ac @@ -96,14 +96,11 @@ AM_CONDITIONAL([ENABLE_GCC_WARNINGS], [test "$enable_gcc_warnings" = yes]) if test "$enable_gcc_warnings" = yes; then # -Wno-tautological-constant-out-of-range-compare for Clang 3.3 and # 3.4 on GNU/Linux that choke on intprops.h's INT_MULTIPLY_WRAPV, - # etc. It's also for these macros, but on GCC 7, 8 and 9 on macOS - # and GCC 4.6, 4.7 and 4.9 on GNU/Linux, that we disable - # -Wtype-limits globally. See - # https://lists.gnu.org/archive/html/bug-bison/2019-10/msg00061.html. + # etc. warn_common='-Wall -Wextra -Wcast-align -fparse-all-comments -Wdocumentation -Wformat -Wimplicit-fallthrough -Wnull-dereference - -Wno-sign-compare -Wno-tautological-constant-out-of-range-compare -Wno-type-limits + -Wno-sign-compare -Wno-tautological-constant-out-of-range-compare -Wpointer-arith -Wshadow -Wwrite-strings' warn_c='-Wbad-function-cast -Wstrict-prototypes' @@ -119,7 +116,7 @@ if test "$enable_gcc_warnings" = yes; then # details for lalr1.cc. warn_tests='-Wundef -pedantic -Wconversion -Wdeprecated -Wsign-compare -Wsign-conversion - -Wtautological-constant-out-of-range-compare -Wtype-limits + -Wtautological-constant-out-of-range-compare -fno-color-diagnostics -Wno-keyword-macro' |