From: Jason Merrill Date: Tue, 25 Nov 1997 21:27:19 +0000 (+0000) Subject: init.c (build_new): Stick a CLEANUP_POINT_EXPR inside the TRY_CATCH_EXPR for now. X-Git-Tag: releases/egcs-1.0.0~62 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3a2922ddc9729c5a68c1e58e0d8a979631f24f15;p=thirdparty%2Fgcc.git init.c (build_new): Stick a CLEANUP_POINT_EXPR inside the TRY_CATCH_EXPR for now. * init.c (build_new): Stick a CLEANUP_POINT_EXPR inside the TRY_CATCH_EXPR for now. From-SVN: r16708 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index ca8fb2c0e8ce..4fc00c2654f7 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,8 @@ Mon Nov 24 12:15:55 1997 Jason Merrill + * init.c (build_new): Stick a CLEANUP_POINT_EXPR inside the + TRY_CATCH_EXPR for now. + * exception.cc (struct cp_eh_info): Add handlers field. (__cp_push_exception): Initialize it. (__cp_pop_exception): Decrement it. Don't pop unless it's 0. diff --git a/gcc/cp/init.c b/gcc/cp/init.c index 7100b565a838..57eb8a3d1da8 100644 --- a/gcc/cp/init.c +++ b/gcc/cp/init.c @@ -2742,6 +2742,10 @@ build_new (placement, decl, init, use_global_new) if (cleanup) { + /* FIXME: this is a workaround for a crash due to overlapping + exception regions. Cleanups shouldn't really happen here. */ + rval = build1 (CLEANUP_POINT_EXPR, TREE_TYPE (rval), rval); + rval = build (TRY_CATCH_EXPR, TREE_TYPE (rval), rval, cleanup); rval = build (COMPOUND_EXPR, TREE_TYPE (rval), alloc_expr, rval); }