From ad326ada91b35bc464456c1b8bd8ef22793834a9 Mon Sep 17 00:00:00 2001 From: Akim Demaille Date: Tue, 15 Jan 2019 07:43:16 +0100 Subject: c, c++: avoid implicit fall-throw Reported by Derek Clegg. http://lists.gnu.org/archive/html/bug-bison/2019-01/msg00004.html * configure.ac (warn_common): Add -Wimplicit-fallthrough. This does trigger failures in the test suite. * data/skeletons/glr.c, data/skeletons/lalr1.cc, * data/skeletons/yacc.c, tests/c++.at: Make fall-throws explicit. --- configure.ac | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index b7ba45dc..23aeb86d 100644 --- a/configure.ac +++ b/configure.ac @@ -96,7 +96,8 @@ AM_CONDITIONAL([ENABLE_GCC_WARNINGS], [test "$enable_gcc_warnings" = yes]) if test "$enable_gcc_warnings" = yes; then warn_common='-Wall -Wextra -Wno-sign-compare -Wcast-align -fparse-all-comments -Wdocumentation - -Wformat -Wnull-dereference -Wpointer-arith -Wshadow + -Wformat -Wimplicit-fallthrough -Wnull-dereference + -Wpointer-arith -Wshadow -Wundefined-func-template -Wwrite-strings' warn_c='-Wbad-function-cast -Wstrict-prototypes' warn_cxx='-Wextra-semi -Wnoexcept' -- cgit v1.2.1