diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 9102cbc1bd3..29389f45bdd 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2002-01-04 Dirk Mueller + + * decl.c (finish_constructor_body): create simple + compound stmt instead of a if(1) { } construct. + 2006-01-03 Mark Mitchell PR c++/25492 diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index 020d96f7fd5..2f8533412fd 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -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. */