summaryrefslogtreecommitdiff
path: root/tests/cxx-type.at
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2005-07-20 21:19:40 +0000
committerPaul Eggert <eggert@cs.ucla.edu>2005-07-20 21:19:40 +0000
commit802b9687d00100af2e816fae6174f0000c1e2249 (patch)
tree85cca419b8fb1849a8bd38d09c4e26b0e347a85a /tests/cxx-type.at
parentab703f2c9b0e79a6abd6d587a4df2381643cb24c (diff)
downloadbison-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.at5
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;