From 5f070bc759432417ea6bb27d743b6f95ae034c68 Mon Sep 17 00:00:00 2001 From: Ziemowit Laski Date: Thu, 9 Sep 2004 01:49:00 +0000 Subject: [PATCH] Make-lang.in (cp/semantics.o): Depend on c-common.h. [gcc/cp/ChangeLog] 2004-09-08 Ziemowit Laski * Make-lang.in (cp/semantics.o): Depend on c-common.h. * semantics.c: Include c-common.h. (finish_compound_stmt): Call objc_clear_super_receiver(). From-SVN: r87219 --- gcc/cp/ChangeLog | 6 ++++++ gcc/cp/Make-lang.in | 2 +- gcc/cp/semantics.c | 9 ++++++++- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 76c7de34428..2792cca7fed 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2004-09-08 Ziemowit Laski + + * Make-lang.in (cp/semantics.o): Depend on c-common.h. + * semantics.c: Include c-common.h. + (finish_compound_stmt): Call objc_clear_super_receiver(). + 2004-09-08 Ziemowit Laski * cp-tree.h (do_poplevel): New prototype. diff --git a/gcc/cp/Make-lang.in b/gcc/cp/Make-lang.in index 3e91bf90780..29a533bd849 100644 --- a/gcc/cp/Make-lang.in +++ b/gcc/cp/Make-lang.in @@ -267,7 +267,7 @@ cp/repo.o: cp/repo.c $(CXX_TREE_H) $(TM_H) toplev.h diagnostic.h \ gt-cp-repo.h cp/semantics.o: cp/semantics.c $(CXX_TREE_H) $(TM_H) except.h toplev.h \ flags.h debug.h output.h $(RTL_H) $(TIMEVAR_H) $(EXPR_H) \ - tree-inline.h cgraph.h $(TARGET_H) + tree-inline.h cgraph.h $(TARGET_H) c-common.h cp/dump.o: cp/dump.c $(CXX_TREE_H) $(TM_H) tree-dump.h cp/optimize.o: cp/optimize.c $(CXX_TREE_H) $(TM_H) rtl.h integrate.h insn-config.h \ input.h $(PARAMS_H) debug.h tree-inline.h tree-gimple.h $(TARGET_H) diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c index b31e1e2490e..5d50ea687eb 100644 --- a/gcc/cp/semantics.c +++ b/gcc/cp/semantics.c @@ -31,6 +31,7 @@ #include "tm.h" #include "tree.h" #include "cp-tree.h" +#include "c-common.h" #include "tree-inline.h" #include "tree-mudflap.h" #include "except.h" @@ -1088,7 +1089,13 @@ finish_compound_stmt (tree stmt) else if (STATEMENT_LIST_NO_SCOPE (stmt)) stmt = pop_stmt_list (stmt); else - stmt = do_poplevel (stmt); + { + /* Destroy any ObjC "super" receivers that may have been + created. */ + objc_clear_super_receiver (); + + stmt = do_poplevel (stmt); + } /* ??? See c_end_compound_stmt wrt statement expressions. */ add_stmt (stmt); -- 2.30.2