maint: pacify gcc 14.2 -Wmaybe-uninitialized

* data/skeletons/lalr1.cc:
* data/skeletons/yacc.c:
Add YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN and
YY_IGNORE_MAYBE_UNINITIALIZED_END to pacify GCC 14,
apparently after inlining.
This commit is contained in:
Paul Eggert
2025-03-12 20:40:29 -07:00
parent aa0c96bf14
commit 6a4b3240cf
2 changed files with 6 additions and 2 deletions

View File

@@ -986,6 +986,7 @@ b4_dollar_popdef])[]dnl
yyreduce: yyreduce:
yylen = yyr2_[yyn]; yylen = yyr2_[yyn];
{ {
YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
stack_symbol_type yylhs; stack_symbol_type yylhs;
yylhs.state = yy_lr_goto_state_ (yystack_[yylen].state, yyr1_[yyn]);]b4_variant_if([[ yylhs.state = yy_lr_goto_state_ (yystack_[yylen].state, yyr1_[yyn]);]b4_variant_if([[
/* Variants are always initialized to an empty instance of the /* Variants are always initialized to an empty instance of the
@@ -1038,6 +1039,7 @@ b4_dollar_popdef])[]dnl
// Shift the result of the reduction. // Shift the result of the reduction.
yypush_ (YY_NULLPTR, YY_MOVE (yylhs)); yypush_ (YY_NULLPTR, YY_MOVE (yylhs));
YY_IGNORE_MAYBE_UNINITIALIZED_END
} }
goto yynewstate; goto yynewstate;

View File

@@ -1531,9 +1531,11 @@ yypull_parse (yypstate *yyps]b4_user_formals[)
YYLTYPE yylloc = yyloc_default;]])])[ YYLTYPE yylloc = yyloc_default;]])])[
int yystatus; int yystatus;
do { do {
]b4_pure_if([[ YYSTYPE yylval; ]b4_pure_if([[ YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
YYSTYPE yylval;
int ]])[yychar = ]b4_yylex[; int ]])[yychar = ]b4_yylex[;
yystatus = yypush_parse (yyps]b4_pure_if([[, yychar, &yylval]b4_locations_if([[, &yylloc]])])m4_ifset([b4_parse_param], [, b4_args(b4_parse_param)])[); yystatus = yypush_parse (yyps]b4_pure_if([[, yychar, &yylval]b4_locations_if([[, &yylloc]])])m4_ifset([b4_parse_param], [, b4_args(b4_parse_param)])[);]b4_pure_if([[
YY_IGNORE_MAYBE_UNINITIALIZED_END]])[
} while (yystatus == YYPUSH_MORE); } while (yystatus == YYPUSH_MORE);
return yystatus; return yystatus;
}]])[ }]])[