(C++) COM patch -- allow multiple COM base classes

Jason Merrill jason@cygnus.com
Wed Jun 9 10:37:00 GMT 1999


>>>>> Mumit Khan <khan@xraylith.wisc.EDU> writes:

 > The following fixes a following bug in creating COM classes with multiple
 > multiple base classes, all of which are also COM.

Does that work?  I had been thinking that COM would only work with leftmost
bases, but I suppose there's no good reason to think that.  I suppose the
only real distinction of COM classes is that the vtable layout is
different, and the vptr must be at the beginning of the object.  So the
leftmost base of a COM interface must also be a COM interface, and COM-ness
is inherited from the leftmost base, but subsequent bases can be COM or
not, and it doesn't matter.

Make sense?

Jason


More information about the Gcc-patches mailing list