recent implicit functions patch (C++)

Simpson, Kenny Kenny.Simpson@gs.com
Tue Dec 12 11:22:00 GMT 2000


Hi,
  About a week ago I posted a bug report about exception specs for
implicitly
defined functions not being correct.  At the time I was informed that gcc
didn't
do exception specs for implicit functions, and so wouldn't check them.
  Much to my delight I saw a patch go in yesterday that seemed to fix the
problem.
(See [C++ PATCH] exception specifiers for implicit members).
Am I missing something, or is this patch not in the 2000-12-11 snapshot I
got?
The following code:

struct Base { virtual ~Base() throw() {} };
struct D1 : public Base {}; // implicit destructor should be "inline virtual
~D1() {}"
struct D2 : public D1 { ~D2() {};} // shouldn't compile as it is more lose
than ~D1

compiles without warning, but should fail to compile.
  If I explicitly write in what the implicit destructor should have been,
then I get
a compilation error as I should.

Thanks,
-Kenny

(Not speaking for my employer or anyone else)


More information about the Gcc-bugs mailing list