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


View this message in rfc822 format

From: Narayanan Nellayi <n.a.narayanan <at> gmail.com>
To: 41348 <at> debbugs.gnu.org
Cc: "Narayanan N.A." <n.a.narayanan <at> gmail.com>
Subject: bug#41348: emacs compilation with clang10 fails in the file lib-src/etags.c
Date: Sun, 17 May 2020 21:23:46 +0530
Hi,

The following patch also works; this is in case removal of a "break"
statement requires either a "FALLTHROUGH" or a"goto" statement. The
previous patch was to just comment out FALLTHROUGH and the other
alternative is to replace FALLTHROUGH with a goto, though using goto
to jump to the next statement looks odd.

> diff --git a/lib-src/etags.c b/lib-src/etags.c
> index eee2c59626..b3d4642505 100644
> --- a/lib-src/etags.c
> +++ b/lib-src/etags.c
> @@ -4196,7 +4196,8 @@ C_entries (int c_ext, FILE *inf)
>               objdef = omethodsign;
>               break;
>             }
> -         FALLTHROUGH;
> +         // FALLTHROUGH;
> +         goto resetfvdef;
>         resetfvdef:
>         case '#': case '~': case '&': case '%': case '/':
>         case '|': case '^': case '!': case '.': case '?':

Options I used to build emacs:

./configure 'CFLAGS=-Ofast -march=skylake -funroll-loops
-fno-finite-math-only' CC=clang   \
            --with-mailutils --with-sound=yes --with-x-toolkit=gtk3
                                               \
            --with-gconf --with-modules --with-file-notification=yes
                                               \
            --with-xwidgets --with-xaw3d=yes --with-libsystemd=yes
                                         \
            --with-imagemagick=yes

Regards
Narayanan




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

Previous Next


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