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: "mattias at virtutech dot se" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 15 Jul 2005 15:29:53 -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 mattias at virtutech dot se 2005-07-15 15:29 -------
(In reply to comment #18)
> The "side" notes were written by people who know what they
> intend. Therefore their inputs are completely relevant here.
Even if you could show that these optimisations would contradict the letter
and/or spirit of the C++ standard, this does not mean the same thing for C,
where this clearly (my judgement) is a missed optimisation opportunity for
standard-conforming code.
(It is really two related optimisations: that Q=P+I implies P!=NULL and that it
implies Q!=NULL.)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22485