vcall offset description

Mark Mitchell mark at codesourcery.com
Tue Apr 4 18:32:23 UTC 2000


I noticed some red ink in the vcall offset description:

  Virtual call (vcall) offsets are used to perform pointer adjustment
  for virtual functions defined in a virtual base class or its
  subobjects, and overridden in a class derived from it.

I think we need the vcall offsets even if the function is not
overridden.  Otherwise, when the same base appears as a virtual base
in two different hierarchies, its vtable layout might be different.
Then, if a single hierarchy combines both uses, everything will get
confused.  So, I think the last clause (`and overridden ...') should
go.  Sound right?

--
Mark Mitchell                   mark at codesourcery.com
CodeSourcery, LLC               http://www.codesourcery.com




More information about the cxx-abi-dev mailing list