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: "mpolacek at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 29 Aug 2016 18:13:46 +0000
- Subject: [Bug c/77292] Spurious warning: logical not is only applied to the left hand side of comparison
- Auto-submitted: auto-generated
- References: <bug-77292-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77292
--- Comment #15 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Author: mpolacek
Date: Mon Aug 29 18:13:13 2016
New Revision: 239833
URL: https://gcc.gnu.org/viewcvs?rev=239833&root=gcc&view=rev
Log:
PR c/77292
* c-common.c (warn_logical_not_parentheses): Don't warn for
a comparison or a logical operator.
* c-c++-common/Wlogical-not-parentheses-1.c: New test.
Added:
trunk/gcc/testsuite/c-c++-common/Wlogical-not-parentheses-1.c
Modified:
trunk/gcc/c-family/ChangeLog
trunk/gcc/c-family/c-common.c
trunk/gcc/testsuite/ChangeLog