From 54e99197bd68fc0383f3669959e4a23c778ae476 Mon Sep 17 00:00:00 2001 From: "Yukihiro \"Matz\" Matsumoto" Date: Sat, 22 Jun 2024 13:34:46 +0900 Subject: [PATCH] Revert "tools/lrama: apply ruby/lrama#442" This reverts commit fb9fbc8498c2e28005a422481760d27c3dff7338. The fix in the upstream still causes syntax error in C++. --- tools/lrama/template/bison/yacc.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/tools/lrama/template/bison/yacc.c b/tools/lrama/template/bison/yacc.c index 37ea4f50b..42d875605 100644 --- a/tools/lrama/template/bison/yacc.c +++ b/tools/lrama/template/bison/yacc.c @@ -1475,11 +1475,7 @@ int yychar; /* The semantic value of the lookahead symbol. */ /* Default value used for initialization, for pacifying older GCCs or non-GCC compilers. */ -#ifdef __cplusplus -static const YYSTYPE yyval_default = YY_INITIAL_VALUE(YYSTYPE()); -#else -YY_INITIAL_VALUE (static const YYSTYPE yyval_default;) -#endif +YY_INITIAL_VALUE (static YYSTYPE yyval_default;) YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); /* Location data for the lookahead symbol. */