diff options
Diffstat (limited to 'gcc/c/c-decl.c')
-rw-r--r-- | gcc/c/c-decl.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/gcc/c/c-decl.c b/gcc/c/c-decl.c index 34560308b83..def10a2e2de 100644 --- a/gcc/c/c-decl.c +++ b/gcc/c/c-decl.c @@ -7076,7 +7076,7 @@ is_duplicate_field (tree x, tree y) static void detect_field_duplicates_hash (tree fieldlist, - hash_table <pointer_hash <tree_node> > htab) + hash_table<pointer_hash <tree_node> > *htab) { tree x, y; tree_node **slot; @@ -7084,7 +7084,7 @@ detect_field_duplicates_hash (tree fieldlist, for (x = fieldlist; x ; x = DECL_CHAIN (x)) if ((y = DECL_NAME (x)) != 0) { - slot = htab.find_slot (y, INSERT); + slot = htab->find_slot (y, INSERT); if (*slot) { error ("duplicate member %q+D", x); @@ -7104,7 +7104,7 @@ detect_field_duplicates_hash (tree fieldlist, && TREE_CODE (TYPE_NAME (TREE_TYPE (x))) == TYPE_DECL) { tree xn = DECL_NAME (TYPE_NAME (TREE_TYPE (x))); - slot = htab.find_slot (xn, INSERT); + slot = htab->find_slot (xn, INSERT); if (*slot) error ("duplicate member %q+D", TYPE_NAME (TREE_TYPE (x))); *slot = xn; @@ -7176,11 +7176,8 @@ detect_field_duplicates (tree fieldlist) } else { - hash_table <pointer_hash <tree_node> > htab; - htab.create (37); - - detect_field_duplicates_hash (fieldlist, htab); - htab.dispose (); + hash_table<pointer_hash <tree_node> > htab (37); + detect_field_duplicates_hash (fieldlist, &htab); } } |