diff options
author | Nicola Pero <nicola.pero@meta-innovation.com> | 2011-04-15 18:15:35 +0000 |
---|---|---|
committer | Nicola Pero <nicola@gcc.gnu.org> | 2011-04-15 18:15:35 +0000 |
commit | 0dc33c3c14650fa55f60b08fdfe4aaeba5c0c9bc (patch) | |
tree | 4be690823fed9a5422c76137ffd4ee6054c70b90 /gcc/objcp | |
parent | 9472124fb40edbebcd6283b8891e4524b400bdc1 (diff) | |
download | gcc-0dc33c3c14650fa55f60b08fdfe4aaeba5c0c9bc.tar.gz |
In gcc/c-family/: 2011-04-15 Nicola Pero <nicola.pero@meta-innovation.com>
In gcc/c-family/:
2011-04-15 Nicola Pero <nicola.pero@meta-innovation.com>
* c-objc.h (objc_get_interface_ivars): Removed.
(objc_detect_field_duplicates): New.
* stub-objc.c: Likewise.
In gcc/:
2011-04-15 Nicola Pero <nicola.pero@meta-innovation.com>
* c-decl.c (detect_field_duplicates): Call
objc_detect_field_duplicates instead of objc_get_interface_ivars.
In gcc/objc/:
2011-04-15 Nicola Pero <nicola.pero@meta-innovation.com>
* objc-act.c (objc_get_interface_ivars): Removed.
(objc_detect_field_duplicates): New.
(hash_instance_variable): New.
(eq_instance_variable): New.
In gcc/objcp/:
2011-04-15 Nicola Pero <nicola.pero@meta-innovation.com>
* objcp-decl.c (objcp_finish_struct): Use
objc_detect_field_duplicates instead of having a local
implementation.
In gcc/testsuite/:
2011-04-15 Nicola Pero <nicola.pero@meta-innovation.com>
* objc.dg/naming-4.m: Updated.
* objc.dg/naming-5.m: Updated.
* objc.dg/naming-6.m: New.
* objc.dg/naming-7.m: New.
* obj-c++.dg/naming-1.mm: Updated.
* obj-c++.dg/naming-2.mm: Updated.
* obj-c++.dg/naming-3.mm: New.
* obj-c++.dg/naming-4.mm: New.
From-SVN: r172511
Diffstat (limited to 'gcc/objcp')
-rw-r--r-- | gcc/objcp/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/objcp/objcp-decl.c | 28 |
2 files changed, 7 insertions, 27 deletions
diff --git a/gcc/objcp/ChangeLog b/gcc/objcp/ChangeLog index f78e493c485..dba3907fa76 100644 --- a/gcc/objcp/ChangeLog +++ b/gcc/objcp/ChangeLog @@ -1,3 +1,9 @@ +2011-04-15 Nicola Pero <nicola.pero@meta-innovation.com> + + * objcp-decl.c (objcp_finish_struct): Use + objc_detect_field_duplicates instead of having a local + implementation. + 2011-04-12 Nathan Froyd <froydnj@codesourcery.com> * objcp-lang.c (objcxx_init_ts): Call objc_common_init_ts and 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 (); |