[Bug c++/78655] gcc doesn't exploit the fact that the result of pointer addition can not be nullptr
redi at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Dec 7 11:06:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78655
--- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(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?
It used to be, but is now UB, since
http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#1748
(There's more background in the PR Marc mentioned, PR 35878).
More information about the Gcc-bugs
mailing list