Virtual base class bug introduced in February

Martin v. Loewis martin@mira.isdn.cs.tu-berlin.de
Mon Mar 1 02:28:00 GMT 1999


> There is no ambiguity in the code.  A wrapper<thing> class has only
> one "base" base class, because the base class is virtual.  Thus, the
> error message is incorrect.

I agree. There is only one 'base' class subobject in a wrapper<thing>.

> (Also, the word warning seems strange.  If there really were
> inheritance ambiguity, shouldn't it be an error?  Of course, the
> code doesn't compile, so I guess this is an error.)

There were two message, and the second one is an error. The first one
(base is inaccessible) is only a warning. If accessing it is
impossible because of ambiguity, the code is still correct - as long
as you don't try to actually access the base.

Regards,
Martin


More information about the Gcc-bugs mailing list