Resolution of B-2 not reflected in B-6 (aka covariant returns)

Christophe de Dinechin ddd at cup.hp.com
Thu Mar 9 17:58:18 UTC 2000


Martin von Loewis wrote:
>
> In the B-2 discussion, the notes say
> 
> # Agreement was reached to avoid the complication of eliminating some
> # of the Vtable entries. Thus, the Vtable will have one entry for each
> # accessible return type of a covariant virtual function.
> 
> I agree with that resolution; it follows that a new slot is allocated
> even if there are no return adjustments. Of course, a smart compiler
> would use the same function entry as in the base part, instead of
> generating a new one.

Actually, I believe this is the only legal thing to do: for the caller, the
return type may be a pointer to an incomplete type, so it doesn't necessarily
know if there is an adjustment or not. So the slot needs to be present.


Christophe




More information about the cxx-abi-dev mailing list