diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2005-07-20 21:19:40 +0000 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2005-07-20 21:19:40 +0000 |
commit | 802b9687d00100af2e816fae6174f0000c1e2249 (patch) | |
tree | 85cca419b8fb1849a8bd38d09c4e26b0e347a85a /tests/cxx-type.at | |
parent | ab703f2c9b0e79a6abd6d587a4df2381643cb24c (diff) | |
download | bison-802b9687d00100af2e816fae6174f0000c1e2249.tar.gz |
(_AT_TEST_GLR_CXXTYPES): Work even with
overly-picky compilers that reject 'char *foo = "bar";'.
Diffstat (limited to 'tests/cxx-type.at')
-rw-r--r-- | tests/cxx-type.at | 5 |
1 files 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>"; } + | error ';' { static char error_msg[] = "<error>"; $$ = 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; |