[cxx-abi-dev] VTT Order question

Jeffrey Oldham oldham at codesourcery.com
Tue Nov 12 16:09:35 UTC 2002


Andreas Hommel wrote:
> The example in "2.6.2 VTT Order" has a typo:
> 
>   class C1 : public virtual V1 { int i; };
>     // C1 has no primary base, V2 is secondary base
> 
> should be changed to:
> 
>   class C1 : public virtual V1 { int i; };
>     // C1 has no primary base, V1 is secondary base

Yes.

> Also, shouldn't the secondary VTT for C1 also get a secondary V1-in-C1 in D
> vtable pointer? I.e. shouldn't
> 
>   // 1. Primary virtual pointer:
>   [0] D has virtual bases (complete object vptr)
> 
>   // 2. Secondary VTTs:
>   [1]  C1 * (has virtual base)
> 
>   [2]  C2 * (has virtual bases)
>   [3]    V3-in-C2 in D (primary vptr)
>   ...
> 
> be changed to:
> 
>   // 1. Primary virtual pointer:
>   [0] D has virtual bases (complete object vptr)
> 
>   // 2. Secondary VTTs:
>   [1]  C1 * (has virtual base)
>   [2]    V1-in-C1 in D (secondary vptr)
> 
> 
>   [3]  C2 * (has virtual bases)
>   [4]    V3-in-C2 in D (primary vptr)

Yes.

I will send a correction to Mark Mitchell to incorporate into the WWW page.

Thanks,
Jeffrey D. Oldham
oldham at codesourcery.com




More information about the cxx-abi-dev mailing list