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
This commit is contained in:
Jakub Jelinek 2015-03-11 20:51:55 +01:00 committed by Jakub Jelinek
parent 9cd4d216e9
commit 17958621a2
4 changed files with 13 additions and 4 deletions

View 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

View 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 ())

View 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

View 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;
}