summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorAkim Demaille <akim.demaille@gmail.com>2019-10-21 10:35:01 +0200
committerAkim Demaille <akim.demaille@gmail.com>2019-10-21 10:35:01 +0200
commitfdef997432f7141d8eaf4396f61708fd3c52ec9d (patch)
tree8267fa6421e0686ec2ea2a041a84114f70650460 /configure.ac
parent0073b5ea5f365ad6f5b5d38bf6dbc4ed6165800d (diff)
downloadbison-fdef997432f7141d8eaf4396f61708fd3c52ec9d.tar.gz
build: disable -Wtautological-constant-out-of-range-compare
Also see e31f92495ce14a5d924b148c8ea1470003cc47c1 and https://lists.gnu.org/archive/html/bug-bison/2019-10/msg00061.html * configure.ac (warn_common): Disable -Wtautological-constant-out-of-range-compare. (warn_tests): Restore it.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac11
1 files changed, 9 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index f055a68c..f0689070 100644
--- a/configure.ac
+++ b/configure.ac
@@ -94,10 +94,16 @@ AC_ARG_ENABLE([gcc-warnings],
[enable_gcc_warnings=no])
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.
warn_common='-Wall -Wextra -Wcast-align
-fparse-all-comments -Wdocumentation
-Wformat -Wimplicit-fallthrough -Wnull-dereference
- -Wno-sign-compare -Wno-type-limits
+ -Wno-sign-compare -Wno-tautological-constant-out-of-range-compare -Wno-type-limits
-Wpointer-arith -Wshadow
-Wwrite-strings'
warn_c='-Wbad-function-cast -Wstrict-prototypes'
@@ -112,7 +118,8 @@ if test "$enable_gcc_warnings" = yes; then
# trick in the test suite to check some private implementation
# details for lalr1.cc.
warn_tests='-Wundef -pedantic -Wconversion
- -Wdeprecated -Wsign-compare -Wsign-conversion -Wtype-limits
+ -Wdeprecated -Wsign-compare -Wsign-conversion
+ -Wtautological-constant-out-of-range-compare -Wtype-limits
-fno-color-diagnostics
-Wno-keyword-macro'