mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-19 17:23:02 +00:00
build: disable -Wtype-limits, except in the test suite
The current implementation of lib/intprops.h results in "unsigned < 0" comparisons, which triggers warnings. See https://lists.gnu.org/archive/html/bug-bison/2019-10/msg00061.html * configure.ac (warn_common): Disable -Wtype-limits. (warn_tests): Restore it.
This commit is contained in:
@@ -94,9 +94,10 @@ AC_ARG_ENABLE([gcc-warnings],
|
|||||||
[enable_gcc_warnings=no])
|
[enable_gcc_warnings=no])
|
||||||
AM_CONDITIONAL([ENABLE_GCC_WARNINGS], [test "$enable_gcc_warnings" = yes])
|
AM_CONDITIONAL([ENABLE_GCC_WARNINGS], [test "$enable_gcc_warnings" = yes])
|
||||||
if test "$enable_gcc_warnings" = yes; then
|
if test "$enable_gcc_warnings" = yes; then
|
||||||
warn_common='-Wall -Wextra -Wno-sign-compare -Wcast-align
|
warn_common='-Wall -Wextra -Wcast-align
|
||||||
-fparse-all-comments -Wdocumentation
|
-fparse-all-comments -Wdocumentation
|
||||||
-Wformat -Wimplicit-fallthrough -Wnull-dereference
|
-Wformat -Wimplicit-fallthrough -Wnull-dereference
|
||||||
|
-Wno-sign-compare -Wno-type-limits
|
||||||
-Wpointer-arith -Wshadow
|
-Wpointer-arith -Wshadow
|
||||||
-Wwrite-strings'
|
-Wwrite-strings'
|
||||||
warn_c='-Wbad-function-cast -Wstrict-prototypes'
|
warn_c='-Wbad-function-cast -Wstrict-prototypes'
|
||||||
@@ -111,7 +112,7 @@ if test "$enable_gcc_warnings" = yes; then
|
|||||||
# trick in the test suite to check some private implementation
|
# trick in the test suite to check some private implementation
|
||||||
# details for lalr1.cc.
|
# details for lalr1.cc.
|
||||||
warn_tests='-Wundef -pedantic -Wconversion
|
warn_tests='-Wundef -pedantic -Wconversion
|
||||||
-Wdeprecated -Wsign-compare -Wsign-conversion
|
-Wdeprecated -Wsign-compare -Wsign-conversion -Wtype-limits
|
||||||
-fno-color-diagnostics
|
-fno-color-diagnostics
|
||||||
-Wno-keyword-macro'
|
-Wno-keyword-macro'
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user