From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jason Merrill To: oliva@dcc.unicamp.br (Alexandre Oliva), egcs@cygnus.com Subject: Re: Is it a bug ? Date: Mon, 08 Dec 1997 22:22:00 -0000 Message-id: References: <199712081205.NAA25992@vbormc.vbo.dec.com> X-SW-Source: 1997-12/msg00516.html >>>>> Alexandre Oliva writes: > 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() {} More correctly, the implicit constructor is trivial, so it doesn't get called at all. > So no exception handling code is inserted there. Declaring the > constructor of A as such should help g++ currently doesn't do any optimization based on throw specs. > but I believe access control should not be performed at that point. The > Nov'97 is not clear about that. I disagree. [expr.new] just says that a deallocation function is called; it gives no indication that this call would be any different from any other call, so access control should be performed. Jason