This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/60760] arithmetic on null pointers should not be allowed in constant expressions
- From: "daniel.kruegler at googlemail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 04 Apr 2014 17:43:28 +0000
- Subject: [Bug c++/60760] arithmetic on null pointers should not be allowed in constant expressions
- Auto-submitted: auto-generated
- References: <bug-60760-4 at http dot gcc dot gnu dot org/bugzilla/>
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;