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

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Narayanan Nellayi <n.a.narayanan@HIDDEN>; Keywords: patch fixed; Done: Tom Tromey <tom@HIDDEN>; Maintainer for emacs is bug-gnu-emacs@HIDDEN.
bug closed, send any further explanations to 41348 <at> debbugs.gnu.org and Narayanan Nellayi <n.a.narayanan@HIDDEN> Request was from Tom Tromey <tom@HIDDEN> to control <at> debbugs.gnu.org. Full text available.
Added tag(s) fixed. Request was from Tom Tromey <tom@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 41348 <at> debbugs.gnu.org:


Received: (at 41348) by debbugs.gnu.org; 17 May 2020 16:01:51 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun May 17 12:01:51 2020
Received: from localhost ([127.0.0.1]:44406 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jaLjX-0005pC-Vi
	for submit <at> debbugs.gnu.org; Sun, 17 May 2020 12:01:51 -0400
Received: from mail-il1-f175.google.com ([209.85.166.175]:41497)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <n.a.narayanan@HIDDEN>) id 1jaLjW-0005p0-7T
 for 41348 <at> debbugs.gnu.org; Sun, 17 May 2020 12:01:46 -0400
Received: by mail-il1-f175.google.com with SMTP id b71so7423791ilg.8
 for <41348 <at> debbugs.gnu.org>; Sun, 17 May 2020 09:01:46 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=mime-version:references:in-reply-to:from:date:message-id:subject:to
 :cc; bh=oRmY5Ti7DCWp8LmLte3D/M45Zqf/oqPwlJ6zY1W/ODg=;
 b=ti/6EUXqF3IruaS3tkhYPgIRGD3YttoVK2C5aRJ7R8n9pbV7772qNmSp1bQOoK1+T4
 cVhHDhD14nRMrkDyZAMEjY7bxE5OZULevj3vNbFRwQeYWCe8cjEF7GiezOVA7+9KEDrY
 4GEDbC0qb1VBUlUr95HO3B0qkM1vHGNPbr8gqr/6WfeR7+QrJJFo8uWBTw6JwgMpZk2u
 bUVV1izeyMNK6lSyGtYh5YBK+yvJ38971vFrOSGOpNyd7adgaAr1hk2h1d76KLNln+eQ
 P6wmlmvAnyNqtwCIzjJ5DiB2KfvBVjkKjpZgBwQ0XOqtY9lwdOfxKGEIUyOev+qS2TE8
 RPDg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to:cc;
 bh=oRmY5Ti7DCWp8LmLte3D/M45Zqf/oqPwlJ6zY1W/ODg=;
 b=TsrraiaEuH5g8WHX9M4zCvCik4SSKlPr4YfsYyzMZlN9S8OGoROIeKBVnoqr1wEPrq
 VIQnqeso1USE2yNmMgqi4kYc45HzZhTFxg8Ezyr7ahD03FhvgdkByz2AIwJqeUVFhPLk
 hrz+ntsrlkiBH98wqmABDgAR5fjqhUBeNPAB2nm5HBsVNokwphjB80a68TVT94mZN3ET
 BzvgHlpo2TkWI7GlR2XKGnBK8Wb2ulygor6hAqlC2Oj5Qq/d+6iyrBZBrUScXOTVeGzO
 WJj8kUyHZ4hVBA9eYxDuS2je/iCPYMrou9tFAFlBgc2YDgrClOCXaNAv0EDlk5y5xFXf
 V/1g==
X-Gm-Message-State: AOAM532G2zRc+U/Eh4ZMI1kYmRhEl6KSO1UgkHadZ/eUNn5swba7aeg+
 fjDa4qBLwaRltPlmpMIE6eC0HH2kbL8WnPxeglma6Xj1hhc=
X-Google-Smtp-Source: ABdhPJzayuTvT8e4ml9iwaYgmY5I70uGXkWPu34x0U/YBjy9V/LhBhOsbjf+zx6G+TgHpRoHmg/VyjuYKV/obtJxGQA=
X-Received: by 2002:a92:d40f:: with SMTP id q15mr11391767ilm.97.1589731300356; 
 Sun, 17 May 2020 09:01:40 -0700 (PDT)
MIME-Version: 1.0
References: <CAPtqxFZtks=xrefX0XOAi=bSBEyRLvzbsHwkA895LZ18JNVKuw@HIDDEN>
 <83tv0ebn50.fsf@HIDDEN> <871rnih8ti.fsf@HIDDEN>
In-Reply-To: <871rnih8ti.fsf@HIDDEN>
From: Narayanan Nellayi <n.a.narayanan@HIDDEN>
Date: Sun, 17 May 2020 21:31:29 +0530
Message-ID: <CAPtqxFbMedMgKw66Dx=7nzwWfLV11kkakG0GDdiiE_K-8peQ9w@HIDDEN>
Subject: Re: bug#41348: emacs compilation with clang10 fails in the file
 lib-src/etags.c
To: Benjamin Riefenstahl <b.riefenstahl@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 41348
Cc: Eli Zaretskii <eliz@HIDDEN>, 41348 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

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@HIDDEN> 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




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41348; Package emacs. Full text available.

Message received at 41348 <at> debbugs.gnu.org:


Received: (at 41348) by debbugs.gnu.org; 17 May 2020 15:54:05 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun May 17 11:54:05 2020
Received: from localhost ([127.0.0.1]:44368 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jaLc5-0005Xw-20
	for submit <at> debbugs.gnu.org; Sun, 17 May 2020 11:54:05 -0400
Received: from mail-io1-f42.google.com ([209.85.166.42]:33781)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <n.a.narayanan@HIDDEN>) id 1jaLc3-0005XR-7z
 for 41348 <at> debbugs.gnu.org; Sun, 17 May 2020 11:54:03 -0400
Received: by mail-io1-f42.google.com with SMTP id k18so7974063ion.0
 for <41348 <at> debbugs.gnu.org>; Sun, 17 May 2020 08:54:03 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=mime-version:from:date:message-id:subject:to:cc;
 bh=1Pah8hCwrclnhH/i4EoovROd5M/idJrTmj8KbJKnvek=;
 b=FxLHd/tFxu0tt0Lh5mq98UafZsaxbw17rnSkFAsdHbFwcXVF7fBVg+aAuf6ajbcy4k
 3Un55g9J1gN8krRzX0KI2TqaiI6nANOIJLzAHcJ/P4tg2ceTxUyaM+vw+Yjx1VuuSr13
 9LTzkzU8VLwoWSc6I+2m/ZXLb6YsbmeG0AY/wkfD6y/KbZ+o6HUMC1x35Cb/aG3mt3Ny
 /1NQe/fKLB4Wnc/vwzVeL/GAsj6Z8J36PYPux4T44Z8kHIyyvHHkTSLIZuMmcQ3GVmia
 FF3qRE3Tuu/U4ringNRwfFcveU8I6jMJeV2vy5jBES1qMVWa8VFs9uwGf1KdbFG7zTpI
 tYHw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:from:date:message-id:subject:to:cc;
 bh=1Pah8hCwrclnhH/i4EoovROd5M/idJrTmj8KbJKnvek=;
 b=QYrIPx72/OkwAv6fOnMRZsKbS/96ueKOvfcBGS0eaVkaEaWdrAuL8exZX1NTvbYo/6
 Uyj+ozzvIx2EH5CYeA32u+0pXp3bYlRyH/mPT7BtAM+sc9r/8juGU+G+Qq07v8EPuLzX
 q6QFuc0GQxNjZt1V7n6O+0uP/WCBsx4ES/kn2HERABObZ+TxJOR4W9jB6DZWsb2nS8T3
 JYyjDOjutjT/ktjvDIv2HEFzYia2Pg6z6gs4j3iokIR1EnusGOcvPqoFJmcTWBCNAf6j
 IPLVtig4c0Cti1O8oDCPW73kY+FaayemX+0VQ5qLtnA1/83I5CrngcFz5uIHd2xB/r9f
 FmRA==
X-Gm-Message-State: AOAM533fJdSWuUfSoB+KZ/VdjTc3ERLp4BPJPIT0zDE/EYqHZWYnikqP
 1TfHULjQgcldrXzrLLkOovfBPopqHfwQc/uwdQVGFlRB
X-Google-Smtp-Source: ABdhPJzNf4tYLv1A7q910RzW9Hfekb/c3D26OxaTvGw+aTvwmQuG/vWC1ONpLNh9EQb18h8dgZ+D/LSrKBaZTQIfA90=
X-Received: by 2002:a5d:9f07:: with SMTP id q7mr10813040iot.126.1589730837341; 
 Sun, 17 May 2020 08:53:57 -0700 (PDT)
MIME-Version: 1.0
From: Narayanan Nellayi <n.a.narayanan@HIDDEN>
Date: Sun, 17 May 2020 21:23:46 +0530
Message-ID: <CAPtqxFa7mJd+oOqXh8zXmMOGaBbqGF4s47986cV7AKQuyKijag@HIDDEN>
Subject: emacs compilation with clang10 fails in the file lib-src/etags.c
To: 41348 <at> debbugs.gnu.org
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 41348
Cc: "Narayanan N.A." <n.a.narayanan@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

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




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41348; Package emacs. Full text available.

Message received at 41348 <at> debbugs.gnu.org:


Received: (at 41348) by debbugs.gnu.org; 17 May 2020 15:37:08 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun May 17 11:37:08 2020
Received: from localhost ([127.0.0.1]:44334 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jaLLg-00053a-0V
	for submit <at> debbugs.gnu.org; Sun, 17 May 2020 11:37:08 -0400
Received: from odoacer.turtle-trading.net ([93.241.193.16]:45102)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <benny@HIDDEN>) id 1jaLLd-00052r-1U
 for 41348 <at> debbugs.gnu.org; Sun, 17 May 2020 11:37:05 -0400
Received: from justinian.turtle-trading.net ([192.168.2.118])
 by odoacer.turtle-trading.net with esmtp (Exim 4.80)
 (envelope-from <benny@HIDDEN>)
 id 1jaLLV-0007Sa-Oz; Sun, 17 May 2020 17:36:57 +0200
Received: from benny by justinian.turtle-trading.net with local (Exim 4.92)
 (envelope-from <benny@HIDDEN>)
 id 1jaLLV-000859-LG; Sun, 17 May 2020 17:36:57 +0200
From: Benjamin Riefenstahl <b.riefenstahl@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#41348: emacs compilation with clang10 fails in the file
 lib-src/etags.c
References: <CAPtqxFZtks=xrefX0XOAi=bSBEyRLvzbsHwkA895LZ18JNVKuw@HIDDEN>
 <83tv0ebn50.fsf@HIDDEN>
Date: Sun, 17 May 2020 17:36:57 +0200
In-Reply-To: <83tv0ebn50.fsf@HIDDEN> (Eli Zaretskii's message of "Sun, 17 May
 2020 18:24:11 +0300")
Message-ID: <871rnih8ti.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.91 (gnu/linux)
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 41348
Cc: Narayanan Nellayi <n.a.narayanan@HIDDEN>, 41348 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

--=-=-=
Content-Type: text/plain

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.


--=-=-=
Content-Type: text/x-patch
Content-Disposition: inline; filename=patch

diff --git a/lib-src/etags.c b/lib-src/etags.c
index 174c33a7a5..5eb7504e67 100644
--- a/lib-src/etags.c
+++ b/lib-src/etags.c
@@ -4196,9 +4196,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. */

--=-=-=
Content-Type: text/plain


benny

--=-=-=--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41348; Package emacs. Full text available.

Message received at 41348 <at> debbugs.gnu.org:


Received: (at 41348) by debbugs.gnu.org; 17 May 2020 15:24:26 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun May 17 11:24:26 2020
Received: from localhost ([127.0.0.1]:44318 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jaL9O-0004hW-4C
	for submit <at> debbugs.gnu.org; Sun, 17 May 2020 11:24:26 -0400
Received: from eggs.gnu.org ([209.51.188.92]:39462)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1jaL9N-0004hK-44
 for 41348 <at> debbugs.gnu.org; Sun, 17 May 2020 11:24:25 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:60533)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1jaL9H-0007T9-SJ; Sun, 17 May 2020 11:24:19 -0400
Received: from [176.228.60.248] (port=2605 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1jaL9H-0007zz-6G; Sun, 17 May 2020 11:24:19 -0400
Date: Sun, 17 May 2020 18:24:11 +0300
Message-Id: <83tv0ebn50.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Narayanan Nellayi <n.a.narayanan@HIDDEN>
In-Reply-To: <CAPtqxFZtks=xrefX0XOAi=bSBEyRLvzbsHwkA895LZ18JNVKuw@HIDDEN>
 (message from Narayanan Nellayi on Sun, 17 May 2020 12:32:39 +0530)
Subject: Re: bug#41348: emacs compilation with clang10 fails in the file
 lib-src/etags.c
References: <CAPtqxFZtks=xrefX0XOAi=bSBEyRLvzbsHwkA895LZ18JNVKuw@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 41348
Cc: 41348 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Narayanan Nellayi <n.a.narayanan@HIDDEN>
> Date: Sun, 17 May 2020 12:32:39 +0530
> Cc: "Narayanan N.A." <n.a.narayanan@HIDDEN>
> 
> emacs compilation with clang10 on Ubuntu 20.04 (focal release) fails with an error in the file lib-src/etags.c.
> I am able to fix the issue with a one-line change. This compilation failure is seen on the emacs src from
> top-of-the-master-branch.
> 
> Pls see if this fix is appropriate and consider accordingly.

Does this mean Clang doesn't support __attribute__ ((__fallthrough__))?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41348; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 17 May 2020 08:29:11 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun May 17 04:29:11 2020
Received: from localhost ([127.0.0.1]:42278 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jaEfW-0006Y4-8o
	for submit <at> debbugs.gnu.org; Sun, 17 May 2020 04:29:11 -0400
Received: from lists.gnu.org ([209.51.188.17]:46976)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <n.a.narayanan@HIDDEN>) id 1jaDK1-0004DW-6r
 for submit <at> debbugs.gnu.org; Sun, 17 May 2020 03:02:53 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:56354)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <n.a.narayanan@HIDDEN>)
 id 1jaDK0-00049l-Vb
 for bug-gnu-emacs@HIDDEN; Sun, 17 May 2020 03:02:53 -0400
Received: from mail-il1-x12d.google.com ([2607:f8b0:4864:20::12d]:40028)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <n.a.narayanan@HIDDEN>)
 id 1jaDJz-0002r4-Qm
 for bug-gnu-emacs@HIDDEN; Sun, 17 May 2020 03:02:52 -0400
Received: by mail-il1-x12d.google.com with SMTP id e8so6727828ilm.7
 for <bug-gnu-emacs@HIDDEN>; Sun, 17 May 2020 00:02:51 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=mime-version:from:date:message-id:subject:to:cc;
 bh=GQCGJN8BFFriVp/398e186VoJvBM/caxaOIGXjOCnI8=;
 b=hXdW0KQtWUC0zQ8u22WMW9bLOu47QUQuMou3asif62Cjgx1amCPEiVg0aYd6um99yL
 SUvDOP25PGAHjaRPMpA+3YbIOm7TblkdNOIRBhDDYXc/9MwakB3ByVdPT5zpFiTwy68y
 IsZHbNrsu3R9xiAiTvULc7OQYVZcC3nAGVU5P4SfOE37rPPU2A5KnQFyfS/14AnLRdJT
 YO7bmipQisKTGh0Ebz6HGzQAH7hQmh3tz+n3rPho4+HiSC/o8FfsCX2wk4f1LHOYpPr0
 A4j6Ty+5jsDCgUEaCVOpOGwdkjp2etmcrUn1Jo5E4FYPOZskaz/JhuWzgtUbAnyTui1G
 RXMg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:from:date:message-id:subject:to:cc;
 bh=GQCGJN8BFFriVp/398e186VoJvBM/caxaOIGXjOCnI8=;
 b=XN7fLBxSil0FreQ0GJEhPKpJdxdf80q2XB/rjX41RiJFATzan2bKnhEBYksw4DrLMb
 YusO2oRM6YK25S4xbGgJoE4VlfA2+lMSaL4FLMaMTHzX11UoeyhLgqenGrTxRO9FTNHm
 BTb3KJSOj/QMs4FzDsv1vVALogrj2iQNDAyXzftgvynfUZP+oMuiUWiCsdDnIDMpEAHI
 KHzYRFtkuKKxRhHDMTt4rWOKsG8BR7c8PydQUis9f7LJvU2UodEKvbbDA+nrMtvUtHmX
 Rv/Ctjto+Mp4tJaxacQyQrttboYYokk4VOuMZYQgnKvP7jfQMwpXij542GDjtd+N9UFH
 13lw==
X-Gm-Message-State: AOAM53065NlVjjb7rLn/pOzkCJGPYmdAywk8iqjFdG9AqkqGXhSrXVSH
 aGP73ku/jHyc2GygFNEfxo1kxVn7r/b1kI+tIEVtVDY1
X-Google-Smtp-Source: ABdhPJwKyeDFPryL8Cl9wjJWkj4bhYo0KBJOYDyOXDuj+XaeIq0dcOMNN7xJQjiQTUbbYo5HqliKkI/k8EksVF3WUfA=
X-Received: by 2002:a92:de02:: with SMTP id x2mr11387220ilm.267.1589698970080; 
 Sun, 17 May 2020 00:02:50 -0700 (PDT)
MIME-Version: 1.0
From: Narayanan Nellayi <n.a.narayanan@HIDDEN>
Date: Sun, 17 May 2020 12:32:39 +0530
Message-ID: <CAPtqxFZtks=xrefX0XOAi=bSBEyRLvzbsHwkA895LZ18JNVKuw@HIDDEN>
Subject: emacs compilation with clang10 fails in the file lib-src/etags.c
To: bug-gnu-emacs@HIDDEN
Content-Type: multipart/alternative; boundary="000000000000695ca105a5d2a222"
Received-SPF: pass client-ip=2607:f8b0:4864:20::12d;
 envelope-from=n.a.narayanan@HIDDEN; helo=mail-il1-x12d.google.com
X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache.
 That's all we know.
X-Spam_score_int: -20
X-Spam_score: -2.1
X-Spam_bar: --
X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001,
 HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001,
 SPF_PASS=-0.001 autolearn=_AUTOLEARN
X-Spam_action: no action
X-Spam-Score: 0.7 (/)
X-Debbugs-Envelope-To: submit
X-Mailman-Approved-At: Sun, 17 May 2020 04:29:09 -0400
Cc: "Narayanan N.A." <n.a.narayanan@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.3 (--)

--000000000000695ca105a5d2a222
Content-Type: text/plain; charset="UTF-8"

Hi,

emacs compilation with clang10 on Ubuntu 20.04 (focal release) fails with
an error in the file lib-src/etags.c. I am able to fix the issue with a
one-line change. This compilation failure is seen on the emacs src from
top-of-the-master-branch.

Pls see if this fix is appropriate and consider accordingly.

I have given below the details on the issue and a patch description.

Regards
Narayanan

clang --version
> clang version 10.0.0-4ubuntu1
> Target: x86_64-pc-linux-gnu
> Thread model: posix
> InstalledDir: /usr/bin
>


> make -C lib-src all
> make[1]: Entering directory
> '/mnt/myvg_fs/home/anarayan/sources/emacs/lib-src'
>   CCLD     etags
> error: fallthrough annotation does not directly precede switch label
> 1 error generated.
> make[1]: *** [Makefile:366: etags] Error 1
> make[1]: Leaving directory
> '/mnt/myvg_fs/home/anarayan/sources/emacs/lib-src'
> make: *** [Makefile:411: lib-src] Error 2
>


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

>

--000000000000695ca105a5d2a222
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div>Hi,</div><div><br></div><div>emacs compilation with c=
lang10 on Ubuntu 20.04 (focal release) fails with an error in the file lib-=
src/etags.c. I am able to fix the issue with a one-line change. This compil=
ation failure is seen on the emacs src from top-of-the-master-branch.</div>=
<div><br></div><div>Pls see if this fix is appropriate and consider accordi=
ngly.</div><div><br></div><div>I have given below the details on the issue =
and a patch description.</div><div><br></div><div>Regards</div><div>Narayan=
an</div><div><br></div><blockquote class=3D"gmail_quote" style=3D"margin:0p=
x 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">cl=
ang --version<br>clang version 10.0.0-4ubuntu1 <br>Target: x86_64-pc-linux-=
gnu<br>Thread model: posix<br>InstalledDir: /usr/bin<br></blockquote><div>=
=C2=A0</div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0=
.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">make -C lib-s=
rc all<br>make[1]: Entering directory &#39;/mnt/myvg_fs/home/anarayan/sourc=
es/emacs/lib-src&#39;<br>=C2=A0 CCLD =C2=A0 =C2=A0 etags<br>error: fallthro=
ugh annotation does not directly precede switch label<br>1 error generated.=
<br>make[1]: *** [Makefile:366: etags] Error 1<br>make[1]: Leaving director=
y &#39;/mnt/myvg_fs/home/anarayan/sources/emacs/lib-src&#39;<br>make: *** [=
Makefile:411: lib-src] Error 2<br></blockquote><div>=C2=A0</div><blockquote=
 class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px so=
lid rgb(204,204,204);padding-left:1ex">diff --git a/lib-src/etags.c b/lib-s=
rc/etags.c<br>index eee2c59626..b5f077007b 100644<br>--- a/lib-src/etags.c<=
br>+++ b/lib-src/etags.c<br>@@ -4196,7 +4196,7 @@ C_entries (int c_ext, FIL=
E *inf)<br>=C2=A0	 =C2=A0 =C2=A0 =C2=A0objdef =3D omethodsign;<br>=C2=A0	 =
=C2=A0 =C2=A0 =C2=A0break;<br>=C2=A0	 =C2=A0 =C2=A0}<br>-	 =C2=A0FALLTHROUG=
H;<br>+	 =C2=A0// FALLTHROUGH;<br>=C2=A0	resetfvdef:<br>=C2=A0	case &#39;#&=
#39;: case &#39;~&#39;: case &#39;&amp;&#39;: case &#39;%&#39;: case &#39;/=
&#39;:<br>=C2=A0	case &#39;|&#39;: case &#39;^&#39;: case &#39;!&#39;: case=
 &#39;.&#39;: case &#39;?&#39;:<br></blockquote><blockquote class=3D"gmail_=
quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,=
204);padding-left:1ex"><br></blockquote></div>

--000000000000695ca105a5d2a222--




Acknowledgement sent to Narayanan Nellayi <n.a.narayanan@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#41348; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Mon, 25 May 2020 02:15:01 UTC

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