From 17958621a22a7dec744fae89a3bdb5aa552fead7 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Wed, 11 Mar 2015 20:51:55 +0100 Subject: [PATCH] c-parser.c (c_parse_init): Don't call xstrdup on get_identifier argument. * 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 | 5 +++++ gcc/c-family/c-common.c | 5 ++--- gcc/c/ChangeLog | 5 +++++ gcc/c/c-parser.c | 2 +- 4 files changed, 13 insertions(+), 4 deletions(-) diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog index 3420c96..9086560 100644 --- a/gcc/c-family/ChangeLog +++ b/gcc/c-family/ChangeLog @@ -1,3 +1,8 @@ +2015-03-11 Jakub Jelinek + + * c-common.c (c_common_nodes_and_builtins): Don't call xstrdup + on record_builtin_type argument. + 2015-03-10 Jakub Jelinek PR c/65120 diff --git a/gcc/c-family/c-common.c b/gcc/c-family/c-common.c index 7e84eb1..456c619 100644 --- a/gcc/c-family/c-common.c +++ b/gcc/c-family/c-common.c @@ -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 ()) diff --git a/gcc/c/ChangeLog b/gcc/c/ChangeLog index c15b86f..7f429c9 100644 --- a/gcc/c/ChangeLog +++ b/gcc/c/ChangeLog @@ -1,3 +1,8 @@ +2015-03-11 Jakub Jelinek + + * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier + argument. + 2015-03-10 Jakub Jelinek PR c/65120 diff --git a/gcc/c/c-parser.c b/gcc/c/c-parser.c index ceb9e1a..5cc3892 100644 --- a/gcc/c/c-parser.c +++ b/gcc/c/c-parser.c @@ -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; } -- 2.7.4