971225-egcs and virtual inheritance : ill implemented feature?

Alexandre Oliva oliva@dcc.unicamp.br
Fri Jan 16 02:26:00 GMT 1998


Max Lawson writes:

> I'm trying to use virtual inheritance on my i586-pc-linux-glibc1 box.
> But the compilation abort cause the compiler is referring to a missing 
> default-ctor. 

that's because, as required by the C++ Standard, the most derived
class is responsible for initializing direct *and indirect* virtual
base classes.  Even if other base classes provide initializers for
virtual base classes, they are simply ignored.  If no initializer is
given in the most derived class, the default constructor is used,
which is the case in class xxx.

-- 
Alexandre Oliva
mailto:oliva@dcc.unicamp.br mailto:aoliva@acm.org
http://www.dcc.unicamp.br/~oliva
Universidade Estadual de Campinas, SP, Brasil



More information about the Gcc mailing list