Commit a93dcbc5 by Mark Mitchell

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
parent 43849fa9
...@@ -13293,6 +13293,10 @@ finish_constructor_body () ...@@ -13293,6 +13293,10 @@ finish_constructor_body ()
/* In check_return_expr we translate an empty return from a /* In check_return_expr we translate an empty return from a
constructor to a return of `this'. */ constructor to a return of `this'. */
finish_return_stmt (NULL_TREE); 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 /* At the end of every destructor we generate code to restore virtual
...@@ -13521,9 +13525,6 @@ finish_function (lineno, flags) ...@@ -13521,9 +13525,6 @@ finish_function (lineno, flags)
; ;
else if (DECL_CONSTRUCTOR_P (fndecl)) else if (DECL_CONSTRUCTOR_P (fndecl))
{ {
/* All subobjects have been fully constructed at this point. */
end_protect_partials ();
if (call_poplevel) if (call_poplevel)
do_poplevel (); do_poplevel ();
} }
......
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