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: [email protected]
ReportedBy: [email protected]
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;
}
