diff options
Diffstat (limited to 'gcc/objcp/objcp-decl.c')
-rw-r--r-- | gcc/objcp/objcp-decl.c | 28 |
1 files changed, 1 insertions, 27 deletions
diff --git a/gcc/objcp/objcp-decl.c b/gcc/objcp/objcp-decl.c index e3571c4a199..ecc2b2b3cbb 100644 --- a/gcc/objcp/objcp-decl.c +++ b/gcc/objcp/objcp-decl.c @@ -70,33 +70,7 @@ objcp_finish_struct (location_t loc ATTRIBUTE_UNUSED, ivars, we need to check for duplicate ivars. */ if (fieldlist) - { - tree original_fieldlist = fieldlist; - fieldlist = objc_get_interface_ivars (fieldlist); - if (fieldlist != original_fieldlist) - { - /* Minimal implementation of the equivalent of the C - front-end's detect_field_duplicates(). - */ - htab_t htab = htab_create (37, htab_hash_pointer, htab_eq_pointer, NULL); - tree x, y; - void **slot; - - for (x = fieldlist; x ; x = DECL_CHAIN (x)) - if ((y = DECL_NAME (x)) != 0) - { - slot = htab_find_slot (htab, y, INSERT); - if (*slot) - { - error ("duplicate member %q+D", x); - DECL_NAME (x) = NULL_TREE; - } - *slot = y; - } - - htab_delete (htab); - } - } + objc_detect_field_duplicates (true); pop_lang_context (); |