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 target/21479] optimizer removes incorrectly variable comparision in if clause


------- 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


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