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++/60760] arithmetic on null pointers should not be allowed in constant expressions


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60760

Daniel KrÃgler <daniel.kruegler at googlemail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |daniel.kruegler@googlemail.
                   |                            |com

--- Comment #1 from Daniel KrÃgler <daniel.kruegler at googlemail dot com> ---
Agreed. But it should still be possible to add the additive identity (The core
language drafted to support this):

constexpr int* ptr = nullptr;
constexpr int x = 0;
constexpr int* ptr2 = ptr + x;

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