* init.c (build_new_1): Delay cleanup until end of full expression.
authorMartin v. Löwis <loewis@informatik.hu-berlin.de>
Thu, 22 Oct 1998 14:48:22 +0000 (14:48 +0000)
committerMartin v. Löwis <loewis@gcc.gnu.org>
Thu, 22 Oct 1998 14:48:22 +0000 (14:48 +0000)
From-SVN: r23223

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

index 8bdc1629445768aaa9e3371d7b1c9ea6ca896a47..f2be60cb0c90a22f27081b199d346e2073346fe6 100644 (file)
@@ -1,3 +1,7 @@
+1998-10-22  Martin v. Löwis <loewis@informatik.hu-berlin.de>
+
+        * init.c (build_new_1): Delay cleanup until end of full expression.
+
 1998-10-21  Jason Merrill  <jason@yorick.cygnus.com>
 
        * typeck.c (build_component_ref): Use of a type here is an error.
index 47c83558d53a2cf07f06f391ad3c59323b855430..87c4a596f6413bdaeb5db870ee7615da54b8b2f9 100644 (file)
@@ -2444,9 +2444,6 @@ build_new_1 (exp)
 
          if (cleanup)
            {
-#if 0
-             /* Disable this until flow is fixed so that it doesn't
-                think the initialization of sentry is a dead write.  */
              tree end, sentry, begin, buf, t = TREE_TYPE (rval);
 
              begin = get_target_expr (boolean_true_node);
@@ -2469,14 +2466,6 @@ build_new_1 (exp)
              rval = build (COMPOUND_EXPR, t, begin,
                            build (COMPOUND_EXPR, t, rval,
                                   build (COMPOUND_EXPR, t, end, buf)));
-#else
-             /* 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);
-#endif
            }
        }
     }