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

            Bug ID: 83955
           Summary: false positive implicit-fallthrough warning on switch
                    enum
           Product: gcc
           Version: 8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: rimvydas.jas at gmail dot com
  Target Milestone: ---

Created attachment 43199
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=43199&action=edit
testcase

Attached testcase on openSUSE and DragonFly BSD for trunk gives:

$ /opt/gcc/20180120/bin/gcc -v -Wall -Wextra -c enum_fall.c
enum_fall.c: In function 'cu_fgets':
enum_fall.c:19:3: warning: this statement may fall through
[-Wimplicit-fallthrough=]
   switch (script->type) {
   ^~~~~~
enum_fall.c:25:2: note: here
  case ST_FILE:

gcc version 7.2.1 20171224 is known to work without emitting the diagnostic.

Reply via email to