https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111854
--- Comment #9 from Jonathan Wakely ---
(In reply to Andrew Pinski from comment #6)
> You are mixing up 2 different things.
> First this is about if the operator new is valid and it is because there is
> a corresponding placement delete
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111854
Jonathan Wakely changed:
What|Removed |Added
Resolution|INVALID |---
Keywords|
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111854
TC changed:
What|Removed |Added
CC||rs2740 at gmail dot com
--- Comment #7 from TC
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111854
--- Comment #6 from Andrew Pinski ---
You are mixing up 2 different things.
First this is about if the operator new is valid and it is because there is a
corresponding placement delete operator (this would be rejected at compile
time).
Second
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111854
--- Comment #5 from Andrew Pinski ---
Why? as there is:
void operator delete(void*, std::size_t, std::align_val_t)
noexcept __attribute__((__externally_visible__));
void operator delete[](void*, std::size_t, std::align_val_t)
noexcept
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111854
--- Comment #4 from Barry Revzin ---
The standard says this should be ill-formed.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111854
Andrew Pinski changed:
What|Removed |Added
Resolution|--- |INVALID
Status|UNCONFIRMED
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111854
--- Comment #2 from Andrew Pinski ---
The reason why is you are using the global operator new here rather than trying
the one inside T.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111854
--- Comment #1 from Andrew Pinski ---
I don't see any issues with this program at compile time (runtime it would be
undefined though).