c-parser.c (c_parse_init): Don't call xstrdup on get_identifier argument.
authorJakub Jelinek <jakub@redhat.com>
Wed, 11 Mar 2015 19:51:55 +0000 (20:51 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Wed, 11 Mar 2015 19:51:55 +0000 (20:51 +0100)
* c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
argument.

* c-common.c (c_common_nodes_and_builtins): Don't call xstrdup
on record_builtin_type argument.

From-SVN: r221358

gcc/c-family/ChangeLog
gcc/c-family/c-common.c
gcc/c/ChangeLog
gcc/c/c-parser.c

index 3420c96aff12e566831a085118bb1152be70bb5b..9086560cc446b2029f5ec1177c707fdcdfb09e48 100644 (file)
@@ -1,3 +1,8 @@
+2015-03-11  Jakub Jelinek  <jakub@redhat.com>
+
+       * c-common.c (c_common_nodes_and_builtins): Don't call xstrdup
+       on record_builtin_type argument.
+
 2015-03-10  Jakub Jelinek  <jakub@redhat.com>
 
        PR c/65120
index 7e84eb194b21607154c7c6deb69a69fd07a741b6..456c61955cce4457007da03c42625840043af568 100644 (file)
@@ -5458,11 +5458,10 @@ c_common_nodes_and_builtins (void)
       char name[25];
 
       sprintf (name, "__int%d", int_n_data[i].bitsize);
-      record_builtin_type ((enum rid)(RID_FIRST_INT_N + i), xstrdup (name),
+      record_builtin_type ((enum rid)(RID_FIRST_INT_N + i), name,
                           int_n_trees[i].signed_type);
       sprintf (name, "__int%d unsigned", int_n_data[i].bitsize);
-      record_builtin_type (RID_MAX, xstrdup (name),
-                          int_n_trees[i].unsigned_type);
+      record_builtin_type (RID_MAX, name, int_n_trees[i].unsigned_type);
     }
 
   if (c_dialect_cxx ())
index c15b86f5540b2990416340aa03d2fdd0beb49d50..7f429c97a5b4a655402b742fd0cbadc5e4b44b75 100644 (file)
@@ -1,3 +1,8 @@
+2015-03-11  Jakub Jelinek  <jakub@redhat.com>
+
+       * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
+       argument.
+
 2015-03-10  Jakub Jelinek  <jakub@redhat.com>
 
        PR c/65120
index ceb9e1a78e7c567d20da2220ff551702118ef1de..5cc38923078f18ed13b3bfc3ae009771ea56e8b2 100644 (file)
@@ -139,7 +139,7 @@ c_parse_init (void)
       /* We always create the symbols but they aren't always supported.  */
       char name[50];
       sprintf (name, "__int%d", int_n_data[i].bitsize);
-      id = get_identifier (xstrdup (name));
+      id = get_identifier (name);
       C_SET_RID_CODE (id, RID_FIRST_INT_N + i);
       C_IS_RESERVED_WORD (id) = 1;
     }