]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
init.c (build_new): Stick a CLEANUP_POINT_EXPR inside the TRY_CATCH_EXPR for now.
authorJason Merrill <jason@yorick.cygnus.com>
Tue, 25 Nov 1997 21:27:19 +0000 (21:27 +0000)
committerJeff Law <law@gcc.gnu.org>
Tue, 25 Nov 1997 21:27:19 +0000 (14:27 -0700)
        * init.c (build_new): Stick a CLEANUP_POINT_EXPR inside the
        TRY_CATCH_EXPR for now.

From-SVN: r16708

gcc/cp/ChangeLog
gcc/cp/init.c

index ca8fb2c0e8ce135ab58b84335deb535bc66706f8..4fc00c2654f7d8d92a64871d21b69706feb4e881 100644 (file)
@@ -1,5 +1,8 @@
 Mon Nov 24 12:15:55 1997  Jason Merrill  <jason@yorick.cygnus.com>
 
+       * 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.
index 7100b565a8386a2597d717737dba3c73e894fe0d..57eb8a3d1da8588b9ee67e5953f2db5df27ec358 100644 (file)
@@ -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);
            }