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]

Re: C++ PATCH: Old ABI compatibility


>>>>> Chip Salzenberg <chip@valinux.com> writes:

 > According to Jason Merrill:
 >> >>>>> Chip Salzenberg <chip@valinux.com> writes:
 >>  > True, BUT: Is it at least safe to assume that single, non-virtual
 >>  > inheritance results in no deltas?
 >> 
 >> No.  If the base class has no virtual functions, but the derived class
 >> does, the vptr will be added before the base subobject.

 > Good point.  Another assumption I didn't think of is that the base
 > class already has virtuals, and thus a vtbl.

In that case, the new ABI will not produce deltas in that case.  But you
still shouldn't rely on that, since the standard guarantees nothing about
the layout of non-PODs.

Jason

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