This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Why don't we just FIX the damn vthunk problem?
- To: mrs at wrs dot com (Mike Stump)
- Subject: Re: Why don't we just FIX the damn vthunk problem?
- From: Jason Merrill <jason at cygnus dot com>
- Date: 02 Mar 1999 19:27:45 -0800
- Cc: martin at mira dot isdn dot cs dot tu-berlin dot de, egcs at cygnus dot com, jce2 at po dot cwru dot edu
- References: <199903030315.TAA18812@kankakee.wrs.com>
>>>>> Mike Stump <mrs@wrs.com> writes:
>> To: "Martin v. Loewis" <martin@mira.isdn.cs.tu-berlin.de>
>> Cc: jce2@po.cwru.edu, egcs@cygnus.com
>> From: Jason Merrill <jason@cygnus.com>
>> Date: 02 Mar 1999 18:35:46 -0800
>> >>>>> Martin v Loewis <martin@mira.isdn.cs.tu-berlin.de> writes:
>> > That's an ABI change, isn't it? If the derived class is old code, and
>> > the base class is recompiled, it'll crash - it gets a vtable ptr in
>> > _vptr instead of a vtable array.
>> Yep, you're right. I don't know why we currently set the vptrs before
>> calling base and member ctors, but we do. That's something we could change
>> for -fnew-abi.
> ?
Oops, no, I was misreading the code in emit_base_init. We set the vptrs
after the base ctors but before the member ctors. So I once again believe
that passing via the vptr will work; each ctor would do something like
vtable *tmp = (vtable *) this->A::vptr;
Base::Base(this, 0);
this->A::vptr = tmp[1];
Jason