https://gcc.gnu.org/bugzilla/show_bug.cgi?id=46224
Jonathan Wakely <redi at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2017-09-26 Ever confirmed|0 |1 --- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> --- No they're completely unrelated. Remove throw(std::bad_alloc) from both testcases to prevent those warnings. Here's a C++11 version of comment 1: using size_t = decltype(sizeof(0)); void* operator new( size_t num_bytes, const char* ); struct Foo { Foo() { throw int(); } }; void f() { Foo* p = new(__FILE__) Foo(); } EDG prints: "del.cc", line 12: warning: function "operator new(size_t, const char *)" has no corresponding operator delete (to be called if an exception is thrown during initialization of an allocated object) Foo* p = new(__FILE__) Foo(); ^