This is the mail archive of the
mailing list for the GCC project.
Re: C++ PATCH to setup_vtbl_ptr
- From: Mark Mitchell <mark at codesourcery dot com>
- To: Jason Merrill <jason at redhat dot com>
- Cc: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 12 Dec 2001 10:16:01 -0800
- Subject: Re: C++ PATCH to setup_vtbl_ptr
--On Wednesday, December 12, 2001 05:55:44 PM +0000 Jason Merrill
> Some of the functions-as-trees reorganization broke vtable setup for
> destructors, as we no longer call setup_vtbl_ptr when instantiating
> This patch fixes that by always pushing a
> CTOR_INITIALIZER when in a template. The name could probably be improved,
> but it has precisely the semantics we want. Testcase attached.
> Tested i686-pc-linux-gnu on the 3.0 branch. Mark, this is a regression
> from 2.95; is the patch OK for 3.0.3?
Yes. I found your patch a little tricky to read because I wasn't sure
whether setup_vtbl_ptr could ever get called for something that
wasn't a constructor or destructor. You are assuming that never happens,
and I think you are right. On the mainline, would you mind asserting
|| DECL_DESTRUCTOR_P (current_function_decl)
? Also the comment above setup_vtbl_ptr speaks complete fiction,
and does not explain what the function really does...
Mark Mitchell firstname.lastname@example.org
CodeSourcery, LLC http://www.codesourcery.com