* init.c (build_new_1): Delay cleanup until end of full expression.

From-SVN: r23223
This commit is contained in:
Martin v. Löwis 1998-10-22 14:48:22 +00:00 committed by Martin v. Löwis
parent 298978c933
commit e0afe616d4
2 changed files with 4 additions and 11 deletions

View 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.

View 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
}
}
}