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

            Bug ID: 79164
           Summary: -Wduplicated-branches and macros
           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: ---

-Wduplicated-branches doesn't warn on

#include <stddef.h>
int *
f (int i)
{
  if (i > 9)
    return NULL;
  else
    return NULL;
}

because at least one expression from both arms comes from a macro.  But in this
case we should apparently warn.  We'll have to compare the expressions
side-by-side and decide if they're the same even from the macro expansion point
of view.

Reply via email to