mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-22 02:33:03 +00:00
yacc.c: fix more errors from make maintainer-check-g++
* data/skeletons/yacc.c (yyexpected_tokens): Use casts where needed.
This commit is contained in:
@@ -1149,22 +1149,25 @@ yyexpected_tokens (const yyparse_context_t *yyctx,
|
|||||||
]b4_lac_if([[
|
]b4_lac_if([[
|
||||||
int yyx;
|
int yyx;
|
||||||
for (yyx = 0; yyx < YYNTOKENS; ++yyx)
|
for (yyx = 0; yyx < YYNTOKENS; ++yyx)
|
||||||
if (yyx != YYSYMBOL_YYERROR && yyx != YYSYMBOL_YYUNDEF)
|
{
|
||||||
switch (yy_lac (]b4_push_if([[yyps->yyesa, &yyps->yyes, &yyps->yyes_capacity, yyps->yyssp, yyx]],
|
yysymbol_type_t yysym = YY_CAST (yysymbol_type_t, yyx);
|
||||||
[[yyctx->yyesa, yyctx->yyes, yyctx->yyes_capacity, yyctx->yyssp, yyx]])[))
|
if (yysym != YYSYMBOL_YYERROR && yysym != YYSYMBOL_YYUNDEF)
|
||||||
{
|
switch (yy_lac (]b4_push_if([[yyps->yyesa, &yyps->yyes, &yyps->yyes_capacity, yyps->yyssp, yysym]],
|
||||||
case YYNOMEM:
|
[[yyctx->yyesa, yyctx->yyes, yyctx->yyes_capacity, yyctx->yyssp, yysym]])[))
|
||||||
return YYNOMEM;
|
{
|
||||||
case 1:
|
case YYNOMEM:
|
||||||
continue;
|
return YYNOMEM;
|
||||||
default:
|
case 1:
|
||||||
if (!yyarg)
|
continue;
|
||||||
++yycount;
|
default:
|
||||||
else if (yycount == yyargn)
|
if (!yyarg)
|
||||||
return 0;
|
++yycount;
|
||||||
else
|
else if (yycount == yyargn)
|
||||||
yyarg[yycount++] = yyx;
|
return 0;
|
||||||
}]],
|
else
|
||||||
|
yyarg[yycount++] = yysym;
|
||||||
|
}
|
||||||
|
}]],
|
||||||
[[ int yyn = yypact@{+*]b4_push_if([yyps], [yyctx])[->yyssp@};
|
[[ int yyn = yypact@{+*]b4_push_if([yyps], [yyctx])[->yyssp@};
|
||||||
if (!yypact_value_is_default (yyn))
|
if (!yypact_value_is_default (yyn))
|
||||||
{
|
{
|
||||||
@@ -1185,7 +1188,7 @@ yyexpected_tokens (const yyparse_context_t *yyctx,
|
|||||||
else if (yycount == yyargn)
|
else if (yycount == yyargn)
|
||||||
return 0;
|
return 0;
|
||||||
else
|
else
|
||||||
yyarg[yycount++] = yyx;
|
yyarg[yycount++] = YY_CAST (yysymbol_type_t, yyx);
|
||||||
}
|
}
|
||||||
}]])[
|
}]])[
|
||||||
return yycount;
|
return yycount;
|
||||||
|
|||||||
Reference in New Issue
Block a user