mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-11 21:33:04 +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:
@@ -590,7 +590,10 @@ yytnamerr (char *yyres, const char *yystr)
|
||||
case '\\':
|
||||
if (*++yyp != '\\')
|
||||
goto do_not_strip_quotes;
|
||||
/* Fall through. */
|
||||
else
|
||||
goto append;
|
||||
|
||||
append:
|
||||
default:
|
||||
if (yyres)
|
||||
yyres[yyn] = *yyp;
|
||||
|
||||
@@ -532,7 +532,10 @@ m4_if(b4_prefix, [yy], [],
|
||||
case '\\':
|
||||
if (*++yyp != '\\')
|
||||
goto do_not_strip_quotes;
|
||||
// Fall through.
|
||||
else
|
||||
goto append;
|
||||
|
||||
append:
|
||||
default:
|
||||
yyr += *yyp;
|
||||
break;
|
||||
|
||||
@@ -1066,7 +1066,10 @@ yytnamerr (char *yyres, const char *yystr)
|
||||
case '\\':
|
||||
if (*++yyp != '\\')
|
||||
goto do_not_strip_quotes;
|
||||
/* Fall through. */
|
||||
else
|
||||
goto append;
|
||||
|
||||
append:
|
||||
default:
|
||||
if (yyres)
|
||||
yyres[yyn] = *yyp;
|
||||
|
||||
Reference in New Issue
Block a user