This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/78655] gcc doesn't exploit the fact that the result of pointer addition can not be nullptr
- From: "vanyacpp at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 06 Dec 2016 21:05:20 +0000
- Subject: [Bug c++/78655] gcc doesn't exploit the fact that the result of pointer addition can not be nullptr
- Auto-submitted: auto-generated
- References: <bug-78655-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78655
--- Comment #3 from Ivan Sorokin <vanyacpp at gmail dot com> ---
(In reply to Richard Biener from comment #1)
> Of course I wonder why the check is here in the first place... Is placement
> new valid for nullptr?
I believe this check here is to allow placement new (std::nothrow) T() to work.
I don't know about the standard wording though.