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

            Bug ID: 77803
           Summary: Bogus implicit-fallthrough warning
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: trippels at gcc dot gnu.org
                CC: mpolacek at gcc dot gnu.org
  Target Milestone: ---

This happened while compiling LibreOffice:

 % cat grfmgr2.ii
struct A {};
int a;
void fn1() {
  switch (0) {
  case 0: {
    A b;
    [[fallthrough]];
  }
  default:
    a = 0;
  }
}

 % g++ -Wextra -c grfmgr2.ii
grfmgr2.ii: In function ‘void fn1()’:
grfmgr2.ii:7:20: warning: this statement may fall through
[-Wimplicit-fallthrough]
     [[fallthrough]];
                    ^
grfmgr2.ii:9:3: note: here
   default:
   ^~~~~~~

Reply via email to