Emptyness vs. virtualness
Jason Merrill
jason at redhat.com
Wed Mar 21 23:43:59 UTC 2001
>>>>> "Mark" == Mark Mitchell <mark at codesourcery.com> writes:
> struct A {};
> struct B : public A {
> virtual void f () {}
> };
> struct C : public virtual B {};
> struct A2 : public A {};
> struct D : public C, public A2 {
> };
> Clearly C goes at offset 0. Now, can A2 go at offset 0?
> We have a disagreement between two of our implementations; I'm trying
> to figure out if we actually decided this before or not. Does anyone
> recall any traffic about this?
I don't. My inclination would be to say that A2 cannot be at offset 0;
otherwise we would have to add a new B subobject for D.
Jason
More information about the cxx-abi-dev
mailing list