From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.devel Subject: Re: Compilation warning about PNTR_ADD Date: Tue, 22 May 2018 13:08:04 -0700 Organization: UCLA Computer Science Department Message-ID: <5aba070d-52c7-b341-2fa9-cb87989910e0@cs.ucla.edu> References: <834lizef44.fsf@gnu.org> <831se3ebaq.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------2B6F828D9199E9E7881E7C9A" X-Trace: blaine.gmane.org 1527019622 22908 195.159.176.226 (22 May 2018 20:07:02 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 22 May 2018 20:07:02 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue May 22 22:06:58 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fLDYg-0005rX-4Q for ged-emacs-devel@m.gmane.org; Tue, 22 May 2018 22:06:58 +0200 Original-Received: from localhost ([::1]:57692 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fLDan-0008W2-BM for ged-emacs-devel@m.gmane.org; Tue, 22 May 2018 16:09:09 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45199) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fLDZs-0008UE-J0 for emacs-devel@gnu.org; Tue, 22 May 2018 16:08:13 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fLDZr-0001RU-KT for emacs-devel@gnu.org; Tue, 22 May 2018 16:08:12 -0400 Original-Received: from zimbra.cs.ucla.edu ([131.179.128.68]:44464) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fLDZn-0001Pq-Rn; Tue, 22 May 2018 16:08:08 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 35BA3160516; Tue, 22 May 2018 13:08:06 -0700 (PDT) Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id JZP1nGlaHqpH; Tue, 22 May 2018 13:08:05 -0700 (PDT) Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 33EB7160522; Tue, 22 May 2018 13:08:05 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id dVYInVPNXibC; Tue, 22 May 2018 13:08:05 -0700 (PDT) Original-Received: from Penguin.CS.UCLA.EDU (Penguin.CS.UCLA.EDU [131.179.64.200]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 15F60160516; Tue, 22 May 2018 13:08:05 -0700 (PDT) In-Reply-To: <831se3ebaq.fsf@gnu.org> Content-Language: en-US X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 131.179.128.68 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:225577 Archived-At: This is a multi-part message in MIME format. --------------2B6F828D9199E9E7881E7C9A Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Hmm, looks like a bug in the GCC grammar for function attributes, but if so it's a longstanding one as it's still in GCC 8. Anyway, I installed the attached to work around it. --------------2B6F828D9199E9E7881E7C9A Content-Type: text/x-patch; name="0001-Work-around-GCC-bug-with-function-attributes.patch" Content-Disposition: attachment; filename="0001-Work-around-GCC-bug-with-function-attributes.patch" Content-Transfer-Encoding: quoted-printable >From 5b335e8ee195733b067562d9c4199829b08e8b49 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 22 May 2018 13:05:19 -0700 Subject: [PATCH] Work around GCC bug with function attributes MIME-Version: 1.0 Content-Type: text/plain; charset=3DUTF-8 Content-Transfer-Encoding: 8bit * src/alloc.c (PNTR_ADD): Put attributes after =E2=80=98static=E2=80=99 a= nd before returned type. Problem reported by Eli Zaretskii in: https://lists.gnu.org/r/emacs-devel/2018-05/msg00559.html --- src/alloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/alloc.c b/src/alloc.c index d959c55350..4186347440 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -513,7 +513,7 @@ pointer_align (void *ptr, int alignment) =20 #define macro_PNTR_ADD(p, i) ((p) + (i)) =20 -static char * ATTRIBUTE_NO_SANITIZE_UNDEFINED ATTRIBUTE_UNUSED +static ATTRIBUTE_NO_SANITIZE_UNDEFINED ATTRIBUTE_UNUSED char * PNTR_ADD (char *p, EMACS_UINT i) { return macro_PNTR_ADD (p, i); --=20 2.17.0 --------------2B6F828D9199E9E7881E7C9A--