Commit 2b8b44d8 by Jason Merrill Committed by Jason Merrill

except.c (expand_start_catch_block): suspend_momentary for the terminate handler.

	* except.c (expand_start_catch_block): suspend_momentary for the
	terminate handler.

From-SVN: r17003
parent 14cd4d23
Sun Dec 7 15:53:06 1997 Jason Merrill <jason@yorick.cygnus.com> Sun Dec 7 15:53:06 1997 Jason Merrill <jason@yorick.cygnus.com>
* except.c (expand_start_catch_block): suspend_momentary for the
terminate handler.
* error.c (dump_decl): Handle LOOKUP_EXPR. * error.c (dump_decl): Handle LOOKUP_EXPR.
Sun Dec 7 15:45:07 1997 Mark Mitchell <mmitchell@usa.net> Sun Dec 7 15:45:07 1997 Mark Mitchell <mmitchell@usa.net>
......
...@@ -598,12 +598,15 @@ expand_start_catch_block (declspecs, declarator) ...@@ -598,12 +598,15 @@ expand_start_catch_block (declspecs, declarator)
must call terminate. See eh23.C. */ must call terminate. See eh23.C. */
if (TYPE_NEEDS_CONSTRUCTING (TREE_TYPE (decl))) if (TYPE_NEEDS_CONSTRUCTING (TREE_TYPE (decl)))
{ {
int yes = suspend_momentary ();
tree term = build_function_call (Terminate, NULL_TREE);
resume_momentary (yes);
/* Generate the copy constructor call directly so we can wrap it. /* Generate the copy constructor call directly so we can wrap it.
See also expand_default_init. */ See also expand_default_init. */
init = ocp_convert (TREE_TYPE (decl), init, init = ocp_convert (TREE_TYPE (decl), init,
CONV_IMPLICIT|CONV_FORCE_TEMP, 0); CONV_IMPLICIT|CONV_FORCE_TEMP, 0);
init = build (TRY_CATCH_EXPR, TREE_TYPE (init), init, init = build (TRY_CATCH_EXPR, TREE_TYPE (init), init, term);
build_function_call (Terminate, NULL_TREE));
} }
/* Let `cp_finish_decl' know that this initializer is ok. */ /* Let `cp_finish_decl' know that this initializer is ok. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment