cp-tree.def (CTOR_COMPLETE): New tree node.
authorMark Mitchell <mmitchel@gcc.gnu.org>
Tue, 23 Nov 1999 08:07:09 +0000 (08:07 +0000)
committerMark Mitchell <mmitchel@gcc.gnu.org>
Tue, 23 Nov 1999 08:07:09 +0000 (08:07 +0000)
* 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

index adb3684f4ae8ef1d43b1d22238702cdb12b10e27..c1c7a914efc284c6f9b316f8c9c77fd74bb50f43 100644 (file)
@@ -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 ();
        }