egcs-971016 bug: wrong constructor called, virtual base class.
Alexandre Oliva
oliva@dcc.unicamp.br
Fri Oct 17 21:01:00 GMT 1997
Joseph Heled writes:
> If this is not a bug, it is certainly very surprising behavior. The following
> program prints 'default cons called' instead of 'int cons called'.
This is correct. The CD2 says that constructors of virtual base
classes are always called by the most derived class. If one is not
called explicitly, the default constructor is called, so it must
exist.
--
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-bugs
mailing list