This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/81928] if(!this) optimization leads to possible errors without warnings
- From: "rguenth at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 23 Aug 2017 08:12:13 +0000
- Subject: [Bug c++/81928] if(!this) optimization leads to possible errors without warnings
- Auto-submitted: auto-generated
- References: <bug-81928-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81928
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |WAITING
Last reconfirmed| |2017-08-23
Ever confirmed|0 |1
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
Not sure what you are asking for? We cannot reject the program, the undefined
behavior only exists when this is NULL at runtime. We already warn about the
pointless comparison.
Are you asking to optimize the test away even when not optimizing?