Subject: bug#41348: emacs compilation with clang10 fails in the file lib-src/etags.c

From: Narayanan Nellayi <[email-masked]>
Date: Sun, 17 May 2020 21:31:29 +0530

Hi Benny,

Thanks, what you suggested works and is cleaner than what I had in
mind (which is commenting out FALLTHROUGH or using a goto).

diff --git a/lib-src/etags.c b/lib-src/etags.c
index eee2c59626..4672e3491d 100644
--- a/lib-src/etags.c
+++ b/lib-src/etags.c
@@ -4197,9 +4197,9 @@ C_entries (int c_ext, FILE *inf)
              break;
            }
          FALLTHROUGH;
-       resetfvdef:
        case '#': case '~': case '&': case '%': case '/':
        case '|': case '^': case '!': case '.': case '?':
+       resetfvdef:
          if (definedef != dnone)
            break;
          /* These surely cannot follow a function tag in C. */

Thanks
Narayanan

On Sun, May 17, 2020 at 9:06 PM Benjamin Riefenstahl
<[email-masked]> wrote:
>
> Eli Zaretskii writes:
> > Does this mean Clang doesn't support __attribute__ ((__fallthrough__))?
>
> It looks to like it does support it.  But it complains, that there is a
> non-switch label "resetfvdef:" (for goto) between the annotation and the
> next "case".  The correct fix is probably to move "resetfvdef:" after
> the "case" labels.
>
>
> benny