summaryrefslogtreecommitdiff
path: root/gcc/objcp
diff options
context:
space:
mode:
authorbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2011-05-11 11:13:27 +0000
committerbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2011-05-11 11:13:27 +0000
commitc41143fb1d63596ff2a0f6da741b4bae73b8be16 (patch)
treed70c0763693cfef7bc877f21e079986944261a5f /gcc/objcp
parenteb0badc13724022c8828a55e516d0eecdc487cc3 (diff)
downloadgcc-c41143fb1d63596ff2a0f6da741b4bae73b8be16.tar.gz
2011-05-11 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk rev 173647 using svnmerge git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@173652 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/objcp')
-rw-r--r--gcc/objcp/ChangeLog20
-rw-r--r--gcc/objcp/Make-lang.in4
-rw-r--r--gcc/objcp/config-lang.in11
-rw-r--r--gcc/objcp/objcp-decl.c28
-rw-r--r--gcc/objcp/objcp-lang.c48
5 files changed, 35 insertions, 76 deletions
diff --git a/gcc/objcp/ChangeLog b/gcc/objcp/ChangeLog
index c8d697c581d..dba3907fa76 100644
--- a/gcc/objcp/ChangeLog
+++ b/gcc/objcp/ChangeLog
@@ -1,3 +1,23 @@
+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
+ cp_common_init_ts.
+
+2011-03-21 Nicola Pero <nicola.pero@meta-innovation.com>
+
+ PR bootstrap/48167
+ * Make-lang.in (START_HDRS): Added CXX_PARSER_H and
+ CXX_PRETTY_PRINT_H.
+ * config-lang.in (gtfiles): Added cp/parser.h and reorganized list
+ so that it is more obvious that it is identical to the C++ one
+ with the addition of some files at the end.
+
2011-03-06 Joseph Myers <joseph@codesourcery.com>
* lang-specs.h: Match -save-temps* instead of -save-temps.
diff --git a/gcc/objcp/Make-lang.in b/gcc/objcp/Make-lang.in
index 5bbd27eec35..7e0ef5c4257 100644
--- a/gcc/objcp/Make-lang.in
+++ b/gcc/objcp/Make-lang.in
@@ -45,7 +45,7 @@ obj-c++: cc1objplus$(exeext)
.PHONY: obj-c++
START_HDRS = $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) $(CXX_TREE_H) \
- langhooks.h c-family/c-objc.h objc/objc-act.h
+ $(CXX_PARSER_H) $(CXX_PRETTY_PRINT_H) langhooks.h c-family/c-objc.h objc/objc-act.h
# Use maximal warnings for this front end. Also, make ObjC and C++
# headers accessible.
@@ -78,7 +78,7 @@ cc1objplus$(exeext): $(OBJCXX_OBJS) cc1objplus-checksum.o $(BACKEND) $(LIBDEPS)
objcp/objcp-lang.o : objcp/objcp-lang.c $(START_HDRS) \
$(C_COMMON_H) $(LANGHOOKS_DEF_H) cp/cp-objcp-common.h \
- $(TARGET_H) gtype-objcp.h
+ $(TARGET_H) gtype-objcp.h
objcp/objcp-decl.o : objcp/objcp-decl.c \
$(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) $(CXX_TREE_H) \
diff --git a/gcc/objcp/config-lang.in b/gcc/objcp/config-lang.in
index 8c3d9c54452..e80666da5b5 100644
--- a/gcc/objcp/config-lang.in
+++ b/gcc/objcp/config-lang.in
@@ -37,5 +37,14 @@ build_by_default="no"
lang_requires="objc c++"
subdir_requires="objc cp"
-gtfiles="\$(srcdir)/objc/objc-act.h \$(srcdir)/objc/objc-act.c \$(srcdir)/objc/objc-runtime-shared-support.c \$(srcdir)/objc/objc-gnu-runtime-abi-01.c \$(srcdir)/objc/objc-next-runtime-abi-01.c \$(srcdir)/objc/objc-next-runtime-abi-02.c \$(srcdir)/cp/call.c \$(srcdir)/cp/class.c \$(srcdir)/cp/cp-tree.h \$(srcdir)/cp/decl.c \$(srcdir)/cp/decl2.c \$(srcdir)/cp/mangle.c \$(srcdir)/cp/method.c \$(srcdir)/cp/name-lookup.h \$(srcdir)/cp/name-lookup.c \$(srcdir)/cp/cp-objcp-common.c \$(srcdir)/cp/parser.c \$(srcdir)/cp/pt.c \$(srcdir)/cp/repo.c \$(srcdir)/cp/rtti.c \$(srcdir)/cp/semantics.c \$(srcdir)/cp/tree.c \$(srcdir)/cp/typeck2.c \$(srcdir)/c-family/c-common.c \$(srcdir)/c-family/c-common.h \$(srcdir)/c-family/c-objc.h \$(srcdir)/c-family/c-lex.c \$(srcdir)/c-family/c-cppbuiltin.c \$(srcdir)/c-family/c-pragma.h \$(srcdir)/c-family/c-pragma.c "
+# When you add to this gtfiles list a header which comes from a
+# directory belonging to another language (ie, C++ or ObjC), you need
+# to also edit gengtype.c adding a special rule for the header to
+# avoid having the GC stuff from that header being added to gtype-cp.h
+# or gtype-objc.h.
+
+# This list is separated in two parts: the first one is identical to
+# the C++ one, the second one contains our ObjC++ additions.
+gtfiles="\$(srcdir)/cp/rtti.c \$(srcdir)/cp/mangle.c \$(srcdir)/cp/name-lookup.h \$(srcdir)/cp/name-lookup.c \$(srcdir)/cp/cp-tree.h \$(srcdir)/cp/decl.h \$(srcdir)/cp/call.c \$(srcdir)/cp/decl.c \$(srcdir)/cp/decl2.c \$(srcdir)/cp/pt.c \$(srcdir)/cp/repo.c \$(srcdir)/cp/semantics.c \$(srcdir)/cp/tree.c \$(srcdir)/cp/parser.h \$(srcdir)/cp/parser.c \$(srcdir)/cp/method.c \$(srcdir)/cp/typeck2.c \$(srcdir)/c-family/c-common.c \$(srcdir)/c-family/c-common.h \$(srcdir)/c-family/c-objc.h \$(srcdir)/c-family/c-lex.c \$(srcdir)/c-family/c-pragma.h \$(srcdir)/c-family/c-pragma.c \$(srcdir)/cp/class.c \$(srcdir)/cp/cp-objcp-common.c \
+\$(srcdir)/objc/objc-act.h \$(srcdir)/objc/objc-act.c \$(srcdir)/objc/objc-runtime-shared-support.c \$(srcdir)/objc/objc-gnu-runtime-abi-01.c \$(srcdir)/objc/objc-next-runtime-abi-01.c \$(srcdir)/objc/objc-next-runtime-abi-02.c \$(srcdir)/c-family/c-cppbuiltin.c"
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 ();
diff --git a/gcc/objcp/objcp-lang.c b/gcc/objcp/objcp-lang.c
index fe2be66fff6..0019022b84b 100644
--- a/gcc/objcp/objcp-lang.c
+++ b/gcc/objcp/objcp-lang.c
@@ -89,52 +89,8 @@ objcp_tsubst_copy_and_build (tree t, tree args, tsubst_flags_t complain,
static void
objcxx_init_ts (void)
{
- /* objc decls */
- tree_contains_struct[CLASS_METHOD_DECL][TS_DECL_NON_COMMON] = 1;
- tree_contains_struct[INSTANCE_METHOD_DECL][TS_DECL_NON_COMMON] = 1;
- tree_contains_struct[KEYWORD_DECL][TS_DECL_NON_COMMON] = 1;
- tree_contains_struct[PROPERTY_DECL][TS_DECL_NON_COMMON] = 1;
-
- tree_contains_struct[CLASS_METHOD_DECL][TS_DECL_WITH_VIS] = 1;
- tree_contains_struct[INSTANCE_METHOD_DECL][TS_DECL_WITH_VIS] = 1;
- tree_contains_struct[KEYWORD_DECL][TS_DECL_WITH_VIS] = 1;
- tree_contains_struct[PROPERTY_DECL][TS_DECL_WITH_VIS] = 1;
-
- tree_contains_struct[CLASS_METHOD_DECL][TS_DECL_WRTL] = 1;
- tree_contains_struct[INSTANCE_METHOD_DECL][TS_DECL_WRTL] = 1;
- tree_contains_struct[KEYWORD_DECL][TS_DECL_WRTL] = 1;
- tree_contains_struct[PROPERTY_DECL][TS_DECL_WRTL] = 1;
-
- tree_contains_struct[CLASS_METHOD_DECL][TS_DECL_MINIMAL] = 1;
- tree_contains_struct[INSTANCE_METHOD_DECL][TS_DECL_MINIMAL] = 1;
- tree_contains_struct[KEYWORD_DECL][TS_DECL_MINIMAL] = 1;
- tree_contains_struct[PROPERTY_DECL][TS_DECL_MINIMAL] = 1;
-
- tree_contains_struct[CLASS_METHOD_DECL][TS_DECL_COMMON] = 1;
- tree_contains_struct[INSTANCE_METHOD_DECL][TS_DECL_COMMON] = 1;
- tree_contains_struct[KEYWORD_DECL][TS_DECL_COMMON] = 1;
- tree_contains_struct[PROPERTY_DECL][TS_DECL_COMMON] = 1;
-
- /* C++ decls */
- tree_contains_struct[NAMESPACE_DECL][TS_DECL_NON_COMMON] = 1;
- tree_contains_struct[USING_DECL][TS_DECL_NON_COMMON] = 1;
- tree_contains_struct[TEMPLATE_DECL][TS_DECL_NON_COMMON] = 1;
-
- tree_contains_struct[NAMESPACE_DECL][TS_DECL_WITH_VIS] = 1;
- tree_contains_struct[USING_DECL][TS_DECL_WITH_VIS] = 1;
- tree_contains_struct[TEMPLATE_DECL][TS_DECL_WITH_VIS] = 1;
-
- tree_contains_struct[NAMESPACE_DECL][TS_DECL_WRTL] = 1;
- tree_contains_struct[USING_DECL][TS_DECL_WRTL] = 1;
- tree_contains_struct[TEMPLATE_DECL][TS_DECL_WRTL] = 1;
-
- tree_contains_struct[NAMESPACE_DECL][TS_DECL_COMMON] = 1;
- tree_contains_struct[USING_DECL][TS_DECL_COMMON] = 1;
- tree_contains_struct[TEMPLATE_DECL][TS_DECL_COMMON] = 1;
-
- tree_contains_struct[NAMESPACE_DECL][TS_DECL_MINIMAL] = 1;
- tree_contains_struct[USING_DECL][TS_DECL_MINIMAL] = 1;
- tree_contains_struct[TEMPLATE_DECL][TS_DECL_MINIMAL] = 1;
+ objc_common_init_ts ();
+ cp_common_init_ts ();
init_shadowed_var_for_decl ();
}