Commit 8f7ac220 by Richard Stallman

(yylex): Copy the string value we get from __FUNCTION__.

From-SVN: r3798
parent 2bb3413d
...@@ -1167,7 +1167,12 @@ yylex () ...@@ -1167,7 +1167,12 @@ yylex ()
&& DECL_INITIAL (lastiddecl) != 0 && DECL_INITIAL (lastiddecl) != 0
&& TREE_CODE (DECL_INITIAL (lastiddecl)) == STRING_CST) && TREE_CODE (DECL_INITIAL (lastiddecl)) == STRING_CST)
{ {
yylval.ttype = DECL_INITIAL (lastiddecl); tree stringval = DECL_INITIAL (lastiddecl);
/* Copy the string value so that we won't clobber anything
if we put something in the TREE_CHAIN of this one. */
yylval.ttype = build_string (TREE_STRING_LENGTH (stringval),
TREE_STRING_POINTER (stringval));
value = STRING; value = STRING;
} }
else if (doing_objc_thang) else if (doing_objc_thang)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment