[Bug c++/78655] gcc doesn't exploit the fact that the result of pointer addition can not be nullptr

vanyacpp at gmail dot com gcc-bugzilla@gcc.gnu.org
Tue Dec 6 21:05:00 GMT 2016


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.


More information about the Gcc-bugs mailing list