This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/49706] New: No warning for (!x > 1) which is always false
- 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: Mon, 11 Jul 2011 22:34:42 +0000
- Subject: [Bug c/49706] New: No warning for (!x > 1) which is always false
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49706
Summary: No warning for (!x > 1) which is always false
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: pinskia@gcc.gnu.org
Found this while looking into PR49474:
/* { dg-options "-Wextra -Wall" } */
void warn (void);
int f(int a)
{
if (!a > 1) /* { dg-warning "false" } */
warn();
return 0;
}