mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-14 06:43:03 +00:00
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.
This commit is contained in:
@@ -1242,7 +1242,8 @@ yylex (yy::parser::semantic_type *lvalp)
|
||||
default:
|
||||
lvalp->]AT_VARIANT_IF([build<Object> (res)],
|
||||
[obj = new Object (res)])[;
|
||||
// Fall through.
|
||||
goto zero;
|
||||
zero:
|
||||
case 0:
|
||||
return res;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user