https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71345

            Bug ID: 71345
           Summary: Warn about redundant conditions
           Product: gcc
           Version: 7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: mpolacek at gcc dot gnu.org
  Target Milestone: ---

Perhaps we could/should warn for

int
foo (char c)
{
  if (c != '\0' && c == 'f')
    return 50; 
  return 5;
}

Here, the first condition seems redundant.

Reply via email to