This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]