tools/lrama: apply ruby/lrama#442

This commit is contained in:
Yukihiro "Matz" Matsumoto
2024-06-18 21:12:20 +09:00
parent 73c3970ea1
commit fb9fbc8498
+5 -1
View File
@@ -1475,7 +1475,11 @@ int yychar;
/* The semantic value of the lookahead symbol. */
/* Default value used for initialization, for pacifying older GCCs
or non-GCC compilers. */
YY_INITIAL_VALUE (static YYSTYPE yyval_default;)
#ifdef __cplusplus
static const YYSTYPE yyval_default = YY_INITIAL_VALUE(YYSTYPE());
#else
YY_INITIAL_VALUE (static const YYSTYPE yyval_default;)
#endif
YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
/* Location data for the lookahead symbol. */