http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54196
Bug #: 54196 Summary: gcc doesn't find incompatible exception specification for operator Classification: Unclassified Product: gcc Version: 4.7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassig...@gcc.gnu.org ReportedBy: mib.bugzi...@gmail.com It look like g++ emit error for regular functions but not for new. Here is the example: For following test case g++ emit error for foo but not for operator new. class bad_alloc { public: bad_alloc() throw() { } }; struct nothrow_t { }; extern const nothrow_t nothrow; typedef unsigned long size_t; //void* operator new(size_t) noexcept; void* operator new(size_t, const nothrow_t&); void foo(); int main(int argc, char *argv[]) { void* (*pf)(size_t) throw (bad_alloc) = operator new; void* (*pf1)() throw (bad_alloc) = foo; }