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

--- Comment #2 from jim at meyering dot net ---
Oops. That must have been the "worked-around" version.
Swap the #undef and fallthrough comment to repro:

int
foo (int x)
{
  switch (x)
    {
    case 1:
      x = 3;
      /* fallthrough */
#undef X
    case 2:
      x = 4;
    }
  return x;
}
--------------------
$ /p/p/gcc-2016-10-02.12h48/libexec/gcc/x86_64-pc-linux-gnu/7.0.0/cc1
-Wimplicit-fallthrough /t/ft.c
 foo
Analyzing compilation unit

/t/ft.c: In function ‘foo’:
/t/ft.c:20:9: warning: this statement may fall through [-Wimplicit-fallthroug ]
       x = 3;
       ~~^~~
/t/ft.c:23:5: note: here
     case 2:
     ^~~~

Reply via email to