This is the mail archive of the gcc-patches@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]
Other format: [Raw text]

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.


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