bison: port to GCC 16.1.1 -Wmaybe-uninitialized

* data/skeletons/lalr1.cc: Increase the scope of
YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN.
Needed for GCC 16.1.1 20260515 (Red Hat 16.1.1-2).
This commit is contained in:
Paul Eggert
2026-07-21 12:52:53 -07:00
parent 4f6785aee9
commit ff9eee58c3
+2 -2
View File
@@ -843,6 +843,7 @@ m4_if(b4_prefix, [yy], [],
int int
]b4_parser_class[::parse () ]b4_parser_class[::parse ()
{ {
YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
int yyn; int yyn;
/// Length of the RHS of the rule being reduced. /// Length of the RHS of the rule being reduced.
int yylen = 0; int yylen = 0;
@@ -987,7 +988,6 @@ 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
@@ -1040,7 +1040,6 @@ 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;
@@ -1181,6 +1180,7 @@ b4_dollar_popdef])[]dnl
} }
return yyresult; return yyresult;
YY_IGNORE_MAYBE_UNINITIALIZED_END
} }
#if YY_EXCEPTIONS #if YY_EXCEPTIONS
catch (...) catch (...)