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

--- Comment #11 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
(In reply to Markus Trippelsdorf from comment #10)
> The testcase from PR77955:
> 
> markus@x4 /tmp % cat fall.c
> void bar(int);
> 
> void foo(int i) {
>   switch (i) {
>   case 1: {
>     bar(1);
>     // fall-through
>   }
>   case 2:

Well, this one is even much harder than the preprocessor issue, it isn't
solvable by preserving CPP_COMMENT tokens and ignoring them, there are tokens
in between the fallthru comment and case keyword even after preprocessing here.
I'm afraid this is a clear WONTFIX, move the comment or better use
__attribute__((fallthrough))/[[fallthrough]] instead.

>     bar(2);
>   default:
>     break;

Not warning here is completely intentional, it is a fallthru into break;

Reply via email to