This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: C++ PATCH: ABI bug for vcall offsets
- From: Michael Matz <matz at kde dot org>
- To: Mark Mitchell <mark at codesourcery dot com>
- Cc: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>,"oldham at codesourcery dot com" <oldham at codesourcery dot com>
- Date: Mon, 11 Nov 2002 17:47:06 +0100 (CET)
- Subject: Re: C++ PATCH: ABI bug for vcall offsets
Hi,
On Mon, 11 Nov 2002, Mark Mitchell wrote:
> Adding completely new virtual functions has always broken binary
> compatibility; it changes the layout of vtables.
Uh, yes of course. Ignore me on that one at least, I wasn't awake yet ;)
> Overriding a virtual function can indeed cause ABI changes, but that is
> not new with this change. The use of vcall offsets in general means
> that new overriders change the number of vcall offsets present in the
> vtable.
But that one is sad. I guess we (KDE) just were lucky in the past on that
one (although we already advice against doing that, but with something
like "This is tricky and might be dangerous. Think twice before doing it."
;-) Ok, we simply have to move that into the "you cannot ..." section ;) )
> The ABI was designed this way because Jason invented vcall offsets. :-)
Clever Jason ;)
Thanks for the explanation.
Ciao,
Michael.