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: "pinskia 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 20:35:44 +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
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|REOPENED |RESOLVED
Resolution|--- |INVALID
--- Comment #21 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Matthieu Brucher from comment #19)
> That was my original comment... Thanks for quoting me...
> The issue is that the warning doesn't tell me what you told me, that "this"
> is never equal to nullptr in that context. This is what the warning should
> be (and as such, yes, it is a bug).
Huh????
Yes it is:
nonnull argument ‘this’ compared to NULL
What more do you want it to say. That comparing this to NULL Is undefined
behavior?