summaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>1997-11-21 20:23:57 +0000
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>1997-11-21 20:23:57 +0000
commit7aec20658b8e1c438b5e2df99c8f2ac502d3e7dc (patch)
tree65196e713961e08632110a4cd50d1ff8d0ee433e /gcc/cp
parent2f2bc7197bdd2482bfc93bd093a73b3d464aba49 (diff)
downloadgcc-7aec20658b8e1c438b5e2df99c8f2ac502d3e7dc.tar.gz
* except.c (expand_start_catch_block): We only need the rethrow
region for non-sjlj exceptions. (expand_end_catch_block): Likewise. Use outer_context_label_stack. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@16648 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog6
-rw-r--r--gcc/cp/except.c35
2 files changed, 22 insertions, 19 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 82c0e86983a..c88e084709c 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,9 @@
+Fri Nov 21 12:22:07 1997 Jason Merrill <jason@yorick.cygnus.com>
+
+ * except.c (expand_start_catch_block): We only need the rethrow
+ region for non-sjlj exceptions.
+ (expand_end_catch_block): Likewise. Use outer_context_label_stack.
+
Thu Nov 20 14:40:17 1997 Jason Merrill <jason@yorick.cygnus.com>
* Make-lang.in (CXX_LIB2FUNCS): Add new op new and op delete objs.
diff --git a/gcc/cp/except.c b/gcc/cp/except.c
index 009de14a548..5c2344d43d7 100644
--- a/gcc/cp/except.c
+++ b/gcc/cp/except.c
@@ -558,7 +558,8 @@ expand_start_catch_block (declspecs, declarator)
that contains this catch block.
Matches the end in expand_end_catch_block. */
- expand_eh_region_start ();
+ if (! exceptions_via_longjmp)
+ expand_eh_region_start ();
/* Create a binding level for the eh_info and the exception object
cleanup. */
@@ -667,10 +668,6 @@ expand_start_catch_block (declspecs, declarator)
void
expand_end_catch_block ()
{
- rtx start_region_label_rtx;
- rtx end_region_label_rtx;
- tree decls, t;
-
if (! doing_eh (1))
return;
@@ -684,13 +681,6 @@ expand_end_catch_block ()
/* Cleanup the EH object. */
expand_end_bindings (getdecls (), kept_level_p (), 0);
poplevel (kept_level_p (), 1, 0);
-
- t = make_node (RTL_EXPR);
- TREE_TYPE (t) = void_type_node;
- RTL_EXPR_RTL (t) = const0_rtx;
- TREE_SIDE_EFFECTS (t) = 1;
- do_pending_stack_adjust ();
- start_sequence_for_rtl_expr (t);
if (! exceptions_via_longjmp)
{
@@ -698,15 +688,22 @@ expand_end_catch_block ()
region around the whole catch block to skip through the
terminate region we are nested in. */
- expand_internal_throw (DECL_RTL (top_label_entry (&caught_return_label_stack)));
- }
+ tree t = make_node (RTL_EXPR);
+ TREE_TYPE (t) = void_type_node;
+ RTL_EXPR_RTL (t) = const0_rtx;
+ TREE_SIDE_EFFECTS (t) = 1;
+ do_pending_stack_adjust ();
+ start_sequence_for_rtl_expr (t);
- do_pending_stack_adjust ();
- RTL_EXPR_SEQUENCE (t) = get_insns ();
- end_sequence ();
+ expand_internal_throw (outer_context_label_stack->u.rlabel);
- /* For the rethrow region. */
- expand_eh_region_end (t);
+ do_pending_stack_adjust ();
+ RTL_EXPR_SEQUENCE (t) = get_insns ();
+ end_sequence ();
+
+ /* For the rethrow region. */
+ expand_eh_region_end (t);
+ }
/* Fall to outside the try statement when done executing handler and
we fall off end of handler. This is jump Lresume in the