Is it a bug ?

Alexandre Oliva oliva@dcc.unicamp.br
Mon Dec 8 12:01:00 GMT 1997


knizhnik  writes:

> It looks like bug in compiler (if class A has no constructor then
> no error message is produced)

That's because the implicit constructor defined for A won't ever
throw, that is, it is declared as:

A::A() throw() {}

So no exception handling code is inserted there.  Declaring the
constructor of A as such should help, but I believe access control
should not be performed at that point.  The Nov'97 is not clear about
that.

-- 
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