virtual inheritance: optimization for empty objects

Jason Merrill jason@cygnus.com
Wed Mar 31 23:46:00 GMT 1999


>>>>> Alexander Schiemann <aschiem@count.math.uni-sb.de> writes:

 > - does this suggestion conform with the standard (two base subobjects
 >   having the same address)? I checked it, but perhaps
 >   I missed some requirement.

Yes.  Only base subobjects of the same type are required to have different
addresses.

 > - are there compilers that implement this kind of layout?

I don't know.  IBM's may.  They have a patent on having a vbase with no data
members share space with a derived class, which would not cover this
optimization; but it's in the same area, so they may have thought of it.

I hate software patents.

Jason



More information about the Gcc mailing list