diff options
author | Jason Merrill <jason@yorick.cygnus.com> | 1997-12-08 02:25:36 +0000 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 1997-12-07 21:25:36 -0500 |
commit | 2b8b44d804ffe857a774976ebcabac927f25cfb3 (patch) | |
tree | ba4e5a178d5017a37d47a637cab75283d1af18cf | |
parent | 14cd4d23c89e2d88420d7e8c70d7ce66aa22db30 (diff) | |
download | gcc-2b8b44d804ffe857a774976ebcabac927f25cfb3.zip gcc-2b8b44d804ffe857a774976ebcabac927f25cfb3.tar.gz gcc-2b8b44d804ffe857a774976ebcabac927f25cfb3.tar.bz2 |
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
-rw-r--r-- | gcc/cp/ChangeLog | 3 | ||||
-rw-r--r-- | gcc/cp/except.c | 7 |
2 files changed, 8 insertions, 2 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index d2049df..8476d56 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,8 @@ 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. Sun Dec 7 15:45:07 1997 Mark Mitchell <mmitchell@usa.net> diff --git a/gcc/cp/except.c b/gcc/cp/except.c index cb17021..3d62c77 100644 --- a/gcc/cp/except.c +++ b/gcc/cp/except.c @@ -598,12 +598,15 @@ expand_start_catch_block (declspecs, declarator) must call terminate. See eh23.C. */ 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. See also expand_default_init. */ init = ocp_convert (TREE_TYPE (decl), init, CONV_IMPLICIT|CONV_FORCE_TEMP, 0); - init = build (TRY_CATCH_EXPR, TREE_TYPE (init), init, - build_function_call (Terminate, NULL_TREE)); + init = build (TRY_CATCH_EXPR, TREE_TYPE (init), init, term); } /* Let `cp_finish_decl' know that this initializer is ok. */ |