tests: also check -Wchar-subscripts

GCC's -Wchar-subscripts may report issues on platforms where char is
unsigned.  Unfortunately the current CI does not reproduce the
problem.  But that would allow contributors to report issues if the
warning appears somewhere.

See 139d065594.
Problem reported by Andy Fiddaman in:
https://lists.gnu.org/r/bug-bison/2019-12/msg00021.html

* configure.ac (warn_common): Add -Wchar-subscripts.
This commit is contained in:
Akim Demaille
2019-12-17 06:39:09 +01:00
parent 4d6ff4c5e5
commit 78bb152a63

View File

@@ -100,7 +100,8 @@ 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.
warn_common='-Wall -Wextra -Wcast-align
warn_common='-Wall -Wextra
-Wcast-align -Wchar-subscripts
-fparse-all-comments -Wdocumentation
-Wformat -Wimplicit-fallthrough -Wnull-dereference
-Wno-sign-compare -Wno-tautological-constant-out-of-range-compare