(_AT_TEST_GLR_CXXTYPES): Work even with

overly-picky compilers that reject 'char *foo = "bar";'.
This commit is contained in:
Paul Eggert
2005-07-20 21:19:40 +00:00
parent ab703f2c9b
commit 802b9687d0

View File

@@ -82,7 +82,7 @@ prog :
stmt : expr ';' $2 { $$ = ]$[1; } stmt : expr ';' $2 { $$ = ]$[1; }
| decl $3 | decl $3
| error ';' { $$ = "<error>"; } | error ';' { static char error_msg[] = "<error>"; $$ = error_msg; }
| '@' { YYACCEPT; } | '@' { YYACCEPT; }
; ;
@@ -178,9 +178,10 @@ yylex (LEX_PARAMETERS)
} }
else else
{ {
static char empty_string[] = "";
colNum += 1; colNum += 1;
tok = c; tok = c;
yylval = ""; yylval = empty_string;
} }
#if YYLSP_NEEDED #if YYLSP_NEEDED
yylloc.last_column = colNum-1; yylloc.last_column = colNum-1;