This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Why don't we just FIX the damn vthunk problem?


>>>>> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]