This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/49706] New: No warning for (!x > 1) which is always false


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;
}


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]