diff options
Diffstat (limited to 'gcc/c-pragma.c')
-rw-r--r-- | gcc/c-pragma.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/gcc/c-pragma.c b/gcc/c-pragma.c index 81b9910..e7bb928 100644 --- a/gcc/c-pragma.c +++ b/gcc/c-pragma.c @@ -270,7 +270,8 @@ dpm_hash (const void *p) static int dpm_eq (const void *pa, const void *pb) { - const struct def_pragma_macro *a = pa, *b = pb; + const struct def_pragma_macro *const a = (const struct def_pragma_macro *) pa, + *const b = (const struct def_pragma_macro *) pb; return a->hash == b->hash && strcmp (a->name, b->name) == 0; } @@ -315,10 +316,10 @@ handle_pragma_push_macro (cpp_reader *reader) dummy.name = macroname; slot = htab_find_slot_with_hash (pushed_macro_table, &dummy, dummy.hash, INSERT); - c = *slot; + c = (struct def_pragma_macro *) *slot; if (c == NULL) { - *slot = c = ggc_alloc (sizeof (struct def_pragma_macro)); + *slot = c = GGC_NEW (struct def_pragma_macro); c->hash = dummy.hash; c->name = ggc_alloc_string (macroname, TREE_STRING_LENGTH (id) - 1); c->value.prev = NULL; @@ -326,7 +327,7 @@ handle_pragma_push_macro (cpp_reader *reader) else { struct def_pragma_macro_value *v; - v = ggc_alloc (sizeof (struct def_pragma_macro_value)); + v = GGC_NEW (struct def_pragma_macro_value); *v = c->value; c->value.prev = v; } @@ -372,7 +373,7 @@ handle_pragma_pop_macro (cpp_reader *reader) dummy.hash, NO_INSERT); if (slot == NULL) return; - c = *slot; + c = (struct def_pragma_macro *) *slot; cpp_pop_definition (reader, c->name, c->value.value); |