aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/tree.c
diff options
context:
space:
mode:
authorJason Merrill <jason@gcc.gnu.org>1997-11-10 15:03:49 -0500
committerJason Merrill <jason@gcc.gnu.org>1997-11-10 15:03:49 -0500
commitc7ae64f2cc5733e40bfb3ca6a58a63ece97691e3 (patch)
treebcf117ed27d06a44b18a74813ec3d1623001099e /gcc/cp/tree.c
parent26f578a2286268f9ec2815978264f2647d6516ff (diff)
downloadgcc-c7ae64f2cc5733e40bfb3ca6a58a63ece97691e3.zip
gcc-c7ae64f2cc5733e40bfb3ca6a58a63ece97691e3.tar.gz
gcc-c7ae64f2cc5733e40bfb3ca6a58a63ece97691e3.tar.bz2
stmt.c (expand_decl_cleanup_no_eh): New fn.
* stmt.c (expand_decl_cleanup_no_eh): New fn. * except.c (expand_leftover_cleanups): do_pending_stack_adjust. Complete nested exception support. * except.c (do_pop_exception): Split out... (push_eh_cleanup): From here. Handle the EH region by hand. (expand_start_catch_block): Add a new level for the catch parm. Move the rethrow region outside the two cleanup regions. Protect the initializer for the catch parm with terminate. (expand_end_catch_block): Likewise. End the region for the eh_cleanup. * exception.cc (__cp_pop_exception): Now takes two parms. Handle popping off the middle of the stack. * tree.c (lvalue_p, real_lvalue_p): Handle TRY_CATCH_EXPR, WITH_CLEANUP_EXPR, and UNSAVE_EXPR. (build_cplus_new): Only wrap CALL_EXPRs. * init.c (expand_default_init): Handle a TRY_CATCH_EXPR around the constructor call. From-SVN: r16419
Diffstat (limited to 'gcc/cp/tree.c')
-rw-r--r--gcc/cp/tree.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c
index c681651..9d2589f 100644
--- a/gcc/cp/tree.c
+++ b/gcc/cp/tree.c
@@ -78,6 +78,9 @@ real_lvalue_p (ref)
case PREDECREMENT_EXPR:
case COMPONENT_REF:
case SAVE_EXPR:
+ case UNSAVE_EXPR:
+ case TRY_CATCH_EXPR:
+ case WITH_CLEANUP_EXPR:
return real_lvalue_p (TREE_OPERAND (ref, 0));
case STRING_CST:
@@ -152,6 +155,9 @@ lvalue_p (ref)
case IMAGPART_EXPR:
case COMPONENT_REF:
case SAVE_EXPR:
+ case UNSAVE_EXPR:
+ case TRY_CATCH_EXPR:
+ case WITH_CLEANUP_EXPR:
return lvalue_p (TREE_OPERAND (ref, 0));
case STRING_CST:
@@ -238,7 +244,7 @@ build_cplus_new (type, init)
tree slot;
tree rval;
- if (TREE_CODE (init) == TARGET_EXPR || init == error_mark_node)
+ if (TREE_CODE (init) != CALL_EXPR && TREE_CODE (init) != NEW_EXPR)
return init;
slot = build (VAR_DECL, type);