This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/22485] pointer +- integer is never NULL
- From: "falk at debian dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 14 Jul 2005 15:37:01 -0000
- Subject: [Bug c/22485] pointer +- integer is never NULL
- References: <20050714131031.22485.mattias@virtutech.se>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From falk at debian dot org 2005-07-14 15:37 -------
(In reply to comment #7)
> I'm failing to find anything in the C++ standard that suggests that the
> following shall be undefined
>
> (reinterpret_cast<int*>(0) + 5) - 5
If (reinterpret_cast<int*>(0) + 5) - 5 is not undefined, then neither is
reinterpret_cast<int*>(0) + 5. Then what is its result, by which paragraph
in the standard?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22485