This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/21479] optimizer removes incorrectly variable comparision in if clause
- From: "schlie at comcast dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 9 May 2005 23:19:49 -0000
- Subject: [Bug target/21479] optimizer removes incorrectly variable comparision in if clause
- References: <20050509222003.21479.chaac@nic.fi>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From schlie at comcast dot net 2005-05-09 23:19 -------
(In reply to comment #1)
> I don't think this is a bug since conf and ppv cannot be null as you deferenced them already
> and would trap on most machines. (there is another bug about this recently filed too).
> Oh, one more thing, deferencing a null pointer is undefined by the C standard.
??? Although dereferencing a null pointer may be "undefined" as some machines MAY trap,
it certainly doesn't give a conformant C compiler license to ignore a comparison of a
pointer against null, which is well defined.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21479