+Wed Nov 26 01:11:24 1997 Jason Merrill <jason@yorick.cygnus.com>
+
+ * except.c (expand_start_catch_block): Fix catching a reference
+ to pointer.
+
+Tue Nov 25 11:28:21 1997 Jason Merrill <jason@yorick.cygnus.com>
+
+ * init.c (build_new): Copy size to the saveable obstack.
+
+ * init.c (build_new): Stick a CLEANUP_POINT_EXPR inside the
+ TRY_CATCH_EXPR for now.
+
Mon Nov 24 12:15:55 1997 Jason Merrill <jason@yorick.cygnus.com>
* typeck.c (mark_addressable): Don't assume a FUNCTION_DECL
init_type = build_reference_type (init_type);
exp = get_eh_value ();
+
+ /* Since pointers are passed by value, initialize a reference to
+ pointer catch parm with the address of the value slot. */
+ if (TREE_CODE (init_type) == REFERENCE_TYPE
+ && TREE_CODE (TREE_TYPE (init_type)) == POINTER_TYPE)
+ exp = build_unary_op (ADDR_EXPR, exp, 1);
+
exp = expr_tree_cons (NULL_TREE,
build_eh_type_type (TREE_TYPE (decl)),
expr_tree_cons (NULL_TREE,
if (placement)
flags |= LOOKUP_SPECULATIVELY;
+ /* Copy size to the saveable obstack. */
+ size = copy_node (size);
+
cleanup = build_op_delete_call (dcode, alloc_expr, size, flags);
resume_momentary (yes);
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);
}