This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/77292] Spurious "warning: logical not is only applied to the left hand side of comparison"
- 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: Fri, 19 Aug 2016 07:25:22 +0000
- Subject: [Bug c/77292] Spurious "warning: logical not is only applied to the left hand side of comparison"
- Authentication-results: sourceware.org; auth=none
- Auto-submitted: auto-generated
- References: <bug-77292-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77292
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |diagnostic
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
Well,
// Make it obvious that these are booleans.
a = !!a;
b = !!b;
this isn't visible to the compiler when it analyzes
return !a == b;
to warn. Your example is very specific and unlike from real code so are you
complaining about
return !a == b;
warning even when it is not immediately preceeded by a a = !!a; stmt? Then
we've discussed this to death already.