aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Mitchell <mmitchel@gcc.gnu.org>1999-11-23 08:07:09 +0000
committerMark Mitchell <mmitchel@gcc.gnu.org>1999-11-23 08:07:09 +0000
commita93dcbc53a2054c70bf4c35ee617c4f9f1a8b05a (patch)
tree8596158be4f337d5b23ba7f48ba2f411a2baa9c5
parent43849fa9ee537e419027504c823ad1e8df3da235 (diff)
downloadgcc-a93dcbc53a2054c70bf4c35ee617c4f9f1a8b05a.zip
gcc-a93dcbc53a2054c70bf4c35ee617c4f9f1a8b05a.tar.gz
gcc-a93dcbc53a2054c70bf4c35ee617c4f9f1a8b05a.tar.bz2
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
-rw-r--r--gcc/cp/decl.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index adb3684..c1c7a91 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 ();
}