mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
skeletons: simplify the protections against "unused" warnings.
* data/c.m4 (b4_parse_param_use): Also accept optional arguments to "use". Simplify callers. * data/glr.c (yyuserAction): Simplify use of b4_parse_param_use. (yy_reduce_print): Don't use b4_parse_param_use, as all the arguments _are_ used. * data/lalr1.cc (YY_SYMBOL_PRINT): Even when disabled, "use" the symbol argument. This neutralizes a warning in yypush_ when there are no symbols with a semantic values. (yy_destroy_): Remove useless "use" of yymsg.
This commit is contained in:
@@ -852,8 +852,8 @@ yyuserAction (yyRuleNum yyn, int yyrhslen, yyGLRStackItem* yyvsp,
|
||||
yybool yynormal __attribute__ ((__unused__)) =
|
||||
(yystackp->yysplitPoint == NULL);
|
||||
int yylow;
|
||||
]b4_parse_param_use[]dnl
|
||||
[# undef yyerrok
|
||||
]b4_parse_param_use([yyvalp], [yylocp])[
|
||||
# undef yyerrok
|
||||
# define yyerrok (yystackp->yyerrState = 0)
|
||||
# undef YYACCEPT
|
||||
# define YYACCEPT return yyaccept
|
||||
@@ -1330,8 +1330,7 @@ yy_reduce_print (int yynormal, yyGLRStackItem* yyvsp, size_t yyk,
|
||||
int yynrhs = yyrhsLength (yyrule);]b4_locations_if([
|
||||
int yylow = 1;])[
|
||||
int yyi;
|
||||
]b4_parse_param_use[]dnl
|
||||
[ YYFPRINTF (stderr, "Reducing stack %lu by rule %d (line %lu):\n",
|
||||
YYFPRINTF (stderr, "Reducing stack %lu by rule %d (line %lu):\n",
|
||||
(unsigned long int) yyk, yyrule - 1,
|
||||
(unsigned long int) yyrline[yyrule]);
|
||||
if (! yynormal)
|
||||
|
||||
Reference in New Issue
Block a user