From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Doug Davis Newsgroups: gmane.emacs.devel Subject: Re: master b99ec5d 3/3: Work around __has_attribute bug in clang 3.4 Date: Sat, 23 Jan 2021 14:53:03 -0500 Message-ID: References: <20210122200300.770.63187@vcs0.savannah.gnu.org> <20210122200304.8BBE820A10@vcs0.savannah.gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11172"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (darwin) Cc: Mattias =?utf-8?Q?Engdeg=C3=A5rd?= , emacs-devel@gnu.org, Glenn Morris To: Paul Eggert Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Jan 23 20:55:32 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l3P0N-0002mY-K1 for ged-emacs-devel@m.gmane-mx.org; Sat, 23 Jan 2021 20:55:31 +0100 Original-Received: from localhost ([::1]:51494 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l3P0M-0007GN-L6 for ged-emacs-devel@m.gmane-mx.org; Sat, 23 Jan 2021 14:55:30 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33532) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l3OyC-0006Hf-W1 for emacs-devel@gnu.org; Sat, 23 Jan 2021 14:53:18 -0500 Original-Received: from wout5-smtp.messagingengine.com ([64.147.123.21]:59453) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l3Oy9-0002v8-Bd; Sat, 23 Jan 2021 14:53:16 -0500 Original-Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id 9161C10A6; Sat, 23 Jan 2021 14:53:06 -0500 (EST) Original-Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Sat, 23 Jan 2021 14:53:06 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ddavis.io; h= from:to:cc:subject:references:date:in-reply-to:message-id :mime-version:content-type:content-transfer-encoding; s=fm3; bh= ukPw6mNe4orqO8stHzNTK2sfIuCdK2MtA30dYPL9ZCY=; b=meOcLm1m2jxPnfH6 /lJYXsVi1QRR0WMfeQJChEBoFmCSDsTqgiwU0ax7BAanVB81C1h+9MxF9LthTFFP WLOJoLWUU6tddHKXTZtB1wlq4yYNlCzZ7sO2Bty3O9ZCwH3XN5Uu3wVojSaudmrq F04HkZaVTqnfznZVp13xzHFX4Qf2nuEvXXwkAYfC407BkUJSGanwOl/o/JZW4I3J HLApXqfjaAhENvbFQtH+UMLNtF1vVS4kmU61fj+aefBYCPi6XvkYXnLrpBtpPDcY D+3RvyJfRuDPeq4OUyt3XunLhxtj0+vLC0r+3odqfadzJxKa5JIPJ//Xotv/XPnc OhxIBg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=ukPw6mNe4orqO8stHzNTK2sfIuCdK2MtA30dYPL9Z CY=; b=pGFxOUdcjoLw0pHwRh7UuAsuE3OJJJ3TB/O3N8/wSJ2st24uZQHGFwSv1 oljaJR6Vt8KoP2DibilkkMADCK78954VP+A3BQcaaL3w4ZrXAFjnsoWRx3gkNUIq 8hghx54QUlr+fkm/cJr9pbu4YjyrYpAmkFIgj3FzIiNi4BWCTKb3ztrGjWeNmhsZ aXq69osJk6F+0TVVREM8Ed4y88mW6qMVDnFLWHLNJNtVQ48sakYmU1bBLoVw7/18 INTNZYKdW/wbOC7eUQpJXYv564FjRZ0iak2Mbw9OPkf8XbistgReHLFcxTeJ0aCE U+mgnpwU7nw2NAu3z8798MHmliDYg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrudekgddufeegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufhfffgjkfgfgggtgfesthhqredttderjeenucfhrhhomhepffhouhhg ucffrghvihhsuceouggurghvihhsseguuggrvhhishdrihhoqeenucggtffrrghtthgvrh hnpedvtdefhfejkeefueehueegvdeggfelueegieffgefhkeejfedttefhgeevlefgkeen ucfkphepvdegrdelkedrjeeirdektdenucevlhhushhtvghrufhiiigvpedtnecurfgrrh grmhepmhgrihhlfhhrohhmpeguuggrvhhishesuggurghvihhsrdhioh X-ME-Proxy: Original-Received: from localhost (c-24-98-76-80.hsd1.ga.comcast.net [24.98.76.80]) by mail.messagingengine.com (Postfix) with ESMTPA id 3CDC51080063; Sat, 23 Jan 2021 14:53:05 -0500 (EST) In-Reply-To: (Paul Eggert's message of "Sat, 23 Jan 2021 11:42:28 -0800") Received-SPF: pass client-ip=64.147.123.21; envelope-from=ddavis@ddavis.io; helo=wout5-smtp.messagingengine.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:263314 Archived-At: Paul Eggert writes: > On 1/23/21 2:11 AM, Mattias Engdeg=C3=A5rd wrote: >> 23 jan. 2021 kl. 01.46 skrev Paul Eggert : >>=20 >>> Perhaps someone who can build on macOS directly can provide more info a= bout the problem. I had no problem building with clang 11.0 on Ubuntu but A= pple's clang is special. >> Apple's clang seems to come with a builtin >> #define __nonnull _Nonnull >> which clashes with the the one in lib/cdefs.h. Perhaps we should >> call it something else. > > Thanks for the diagnosis. Although calling it something else would > obviously work, it would require renaming __nonnull everywhere within > Gnulib (and eventually Glibc), and that would be entirely contrary to > the intent of the Apple macro - which was to encourage compatibility > with GNU code. As I understand things Apple's __nonnull keyword used > to mean something else but collided with GNU's __nonnull macro, so > they renamed the keyword and put in a backward-compatibility macro for > old Applish code, but we don't need that macro and can just use > __nonnull for our own use. > > I attempted to fix the problem by installing the attached patch into > Gnulib, and then merged Gnulib into Emacs master. Please give it a > try, as I don't use macOS and so did not check the patch directly. > I just gave it a test and successfully built from scratch (latest commit at b7068be5c4 and on macOS Big Sur with Apple clang 12).