From 802b9687d00100af2e816fae6174f0000c1e2249 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 20 Jul 2005 21:19:40 +0000 Subject: [PATCH] (_AT_TEST_GLR_CXXTYPES): Work even with overly-picky compilers that reject 'char *foo = "bar";'. --- tests/cxx-type.at | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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; -- 2.50.0