From f8d0d78ad1b8990f992f4acc411e849cd1185f8c Mon Sep 17 00:00:00 2001 From: rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> Date: Wed, 4 Jan 2006 15:26:15 +0000 Subject: [PATCH] 2002-01-04 Dirk Mueller <dmueller@suse.com> * decl.c (finish_constructor_body): create simple compound stmt instead of a if(1) { } construct. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@109331 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/cp/ChangeLog | 5 +++++ gcc/cp/decl.c | 25 ------------------------- 2 files changed, 5 insertions(+), 25 deletions(-) diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 9102cbc1bd37..29389f45bdd1 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +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 diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index 020d96f7fd5d..2f8533412fdb 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. */ -- GitLab