Make-lang.in (cp/semantics.o): Depend on c-common.h.

[gcc/cp/ChangeLog]
2004-09-08  Ziemowit Laski  <zlaski@apple.com>

        * 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
This commit is contained in:
Ziemowit Laski 2004-09-09 01:49:00 +00:00 committed by Ziemowit Laski
parent deb176fa3b
commit 5f070bc759
3 changed files with 15 additions and 2 deletions

View File

@ -1,3 +1,9 @@
2004-09-08 Ziemowit Laski <zlaski@apple.com>
* 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 <zlaski@apple.com>
* cp-tree.h (do_poplevel): New prototype.

View File

@ -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)

View File

@ -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);