From: Paul Eggert Date: Wed, 20 Jul 2005 21:19:40 +0000 (+0000) Subject: (_AT_TEST_GLR_CXXTYPES): Work even with X-Git-Tag: BISON-2_1~68 X-Git-Url: https://git.saurik.com/bison.git/commitdiff_plain/802b9687d00100af2e816fae6174f0000c1e2249 (_AT_TEST_GLR_CXXTYPES): Work even with overly-picky compilers that reject 'char *foo = "bar";'. --- diff --git a/tests/cxx-type.at b/tests/cxx-type.at index 8650a5bd..dd67998d 100644 --- a/tests/cxx-type.at +++ b/tests/cxx-type.at @@ -82,7 +82,7 @@ prog : stmt : expr ';' $2 { $$ = ]$[1; } | decl $3 - | error ';' { $$ = ""; } + | error ';' { static char error_msg[] = ""; $$ = error_msg; } | '@' { YYACCEPT; } ; @@ -178,9 +178,10 @@ yylex (LEX_PARAMETERS) } else { + static char empty_string[] = ""; colNum += 1; tok = c; - yylval = ""; + yylval = empty_string; } #if YYLSP_NEEDED yylloc.last_column = colNum-1;