]> gcc.gnu.org Git - gcc.git/commitdiff
(yylex): Copy the string value we get from __FUNCTION__.
authorRichard Stallman <rms@gnu.org>
Sat, 20 Mar 1993 09:05:49 +0000 (09:05 +0000)
committerRichard Stallman <rms@gnu.org>
Sat, 20 Mar 1993 09:05:49 +0000 (09:05 +0000)
From-SVN: r3798

gcc/c-lex.c

index 36cffbb4e806c262d9d8558f20d0193be0802960..c55ac2cfda5a709229a83ea59b00dab1eed1e888 100644 (file)
@@ -1167,7 +1167,12 @@ yylex ()
                   && DECL_INITIAL (lastiddecl) != 0
                   && 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;
            }
           else if (doing_objc_thang)
This page took 0.070093 seconds and 5 git commands to generate.