GNU bug report logs - #41348
emacs compilation with clang10 fails in the file lib-src/etags.c

Previous Next

Package: emacs;

Reported by: Narayanan Nellayi <n.a.narayanan <at> gmail.com>

Date: Sun, 17 May 2020 08:30:02 UTC

Severity: normal

Tags: fixed, patch

Done: Tom Tromey <tom <at> tromey.com>

Bug is archived. No further changes may be made.

Full log


Message #17 received at 41348 <at> debbugs.gnu.org (full text, mbox):

From: Narayanan Nellayi <n.a.narayanan <at> gmail.com>
To: Benjamin Riefenstahl <b.riefenstahl <at> turtle-trading.net>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 41348 <at> debbugs.gnu.org
Subject: Re: bug#41348: emacs compilation with clang10 fails in the file
 lib-src/etags.c
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
<b.riefenstahl <at> turtle-trading.net> 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




This bug report was last modified 4 years and 362 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.