From a93dcbc53a2054c70bf4c35ee617c4f9f1a8b05a Mon Sep 17 00:00:00 2001 From: Mark Mitchell Date: Tue, 23 Nov 1999 08:07:09 +0000 Subject: [PATCH] cp-tree.def (CTOR_COMPLETE): New tree node. * cp-tree.def (CTOR_COMPLETE): New tree node. * decl.c (finish_constructor_body): Add it, to mark the end of the constructor. (finish_function): Don't call end_protect_partials here. * ir.texi (CTOR_COMPLETE): Document it. * semantics.c (expand_stmt): Handle it. From-SVN: r30634 --- gcc/cp/decl.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index adb3684f4ae..c1c7a914efc 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -13293,6 +13293,10 @@ finish_constructor_body () /* In check_return_expr we translate an empty return from a constructor to a return of `this'. */ finish_return_stmt (NULL_TREE); + + /* Mark the end of the main constructor body. */ + if (DECL_CONSTRUCTOR_P (current_function_decl)) + add_tree (build_min_nt (CTOR_COMPLETE)); } /* At the end of every destructor we generate code to restore virtual @@ -13521,9 +13525,6 @@ finish_function (lineno, flags) ; else if (DECL_CONSTRUCTOR_P (fndecl)) { - /* All subobjects have been fully constructed at this point. */ - end_protect_partials (); - if (call_poplevel) do_poplevel (); } -- 2.30.2