Commit ebfd9521 by Dirk Mueller Committed by Richard Biener

decl.c (finish_constructor_body): create simple compound stmt instead of a if(1) { } construct.

2002-01-04  Dirk Mueller <dmueller@suse.com>

	* decl.c (finish_constructor_body): create simple
	compound stmt instead of a if(1) { } construct.

From-SVN: r109331
parent d8701f02
2002-01-04 Dirk Mueller <dmueller@suse.com>
* decl.c (finish_constructor_body): create simple
compound stmt instead of a if(1) { } construct.
2006-01-03 Mark Mitchell <mark@codesourcery.com>
PR c++/25492
......
......@@ -10625,31 +10625,8 @@ finish_constructor_body (void)
static void
begin_destructor_body (void)
{
tree if_stmt;
tree compound_stmt;
/* If the dtor is empty, and we know there is not any possible
way we could use any vtable entries, before they are possibly
set by a base class dtor, we don't have to setup the vtables,
as we know that any base class dtor will set up any vtables
it needs. We avoid MI, because one base class dtor can do a
virtual dispatch to an overridden function that would need to
have a non-related vtable set up, we cannot avoid setting up
vtables in that case. We could change this to see if there
is just one vtable.
??? In the destructor for a class, the vtables are set
appropriately for that class. There will be no non-related
vtables. jason 2001-12-11. */
if_stmt = begin_if_stmt ();
/* If it is not safe to avoid setting up the vtables, then
someone will change the condition to be boolean_true_node.
(Actually, for now, we do not have code to set the condition
appropriately, so we just assume that we always need to
initialize the vtables.) */
finish_if_stmt_cond (boolean_true_node, if_stmt);
compound_stmt = begin_compound_stmt (0);
/* Make all virtual function table pointers in non-virtual base
......@@ -10658,8 +10635,6 @@ begin_destructor_body (void)
initialize_vtbl_ptrs (current_class_ptr);
finish_compound_stmt (compound_stmt);
finish_then_clause (if_stmt);
finish_if_stmt (if_stmt);
/* And insert cleanups for our bases and members so that they
will be properly destroyed if we throw. */
......
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