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

            Bug ID: 79153
           Summary: -Wimplicit-fallthrough missed warning
           Product: gcc
           Version: 7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: sirl at gcc dot gnu.org
  Target Milestone: ---

I believe this testcase modeled after real code should warn when falling
through into 'case 4'.

int
test (int v1, int v2)
{
  switch (v1)
    {
    case 3:
      switch (v2)
        {
        case 1:
          return 28;
        case 2:
          return 38;
        case 3:
          return 88;
        }
    case 4:
      return 168;
    }
  return -1;
}

Reply via email to