https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54804
Martin Sebor <msebor at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED CC| |msebor at gcc dot gnu.org Status|NEW |RESOLVED Target Milestone|--- |7.0 Keywords| |diagnostic --- Comment #2 from Martin Sebor <msebor at gcc dot gnu.org> --- GCC 7 and later warn for both. The change was introduced in r245840. pr54804.c: In function ‘yyparse’: pr54804.c:7:13: warning: ‘yylval’ is used uninitialized [-Wuninitialized] 7 | return yylval; | ^~~~~~ pr54804.c:6:20: note: ‘yylval’ declared here 6 | union YYSTYPE yylval; | ^~~~~~ pr54804.c: In function ‘yyparse_with_struct’: pr54804.c:16:13: warning: ‘xxlval’ is used uninitialized [-Wuninitialized] 16 | return xxlval; | ^~~~~~ pr54804.c:15:15: note: ‘xxlval’ declared here 15 | struct s xxlval; | ^~~~~~