From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS22989 209.51.188.0/24 X-Spam-Status: No, score=-3.9 required=3.0 tests=AWL,BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 3B8FD1F47C for ; Fri, 20 Jan 2023 04:21:19 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pIits-0007qv-JG; Thu, 19 Jan 2023 23:21:12 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pIitq-0007qB-QK for bug-gnulib@gnu.org; Thu, 19 Jan 2023 23:21:10 -0500 Received: from woodpecker.gentoo.org ([2001:470:ea4a:1:5054:ff:fec7:86e4] helo=smtp.gentoo.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256) (Exim 4.90_1) (envelope-from ) id 1pIito-00010Q-Rn for bug-gnulib@gnu.org; Thu, 19 Jan 2023 23:21:10 -0500 Content-Type: multipart/signed; boundary="Apple-Mail=_D61006EF-6477-438E-AF80-9CB91DFC5937"; protocol="application/pgp-signature"; micalg=pgp-sha512 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.300.101.1.3\)) Subject: Re: Making _Noreturn a no-op in < Clang 16? From: Sam James In-Reply-To: <540715fe-d55f-ab64-0d0e-9942ab04fbc1@cs.ucla.edu> Date: Fri, 20 Jan 2023 04:20:09 +0000 Cc: Gnulib bugs , =?utf-8?Q?Arsen_Arsenovi=C4=87?= Message-Id: References: <575c1ae6-d77d-9001-9f9b-a803778446c6@cs.ucla.edu> <1e4c77c2-5d65-0e73-84b8-37d888053a26@cs.ucla.edu> <540715fe-d55f-ab64-0d0e-9942ab04fbc1@cs.ucla.edu> To: Paul Eggert X-Mailer: Apple Mail (2.3731.300.101.1.3) Received-SPF: pass client-ip=2001:470:ea4a:1:5054:ff:fec7:86e4; envelope-from=sam@gentoo.org; helo=smtp.gentoo.org X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: bug-gnulib@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gnulib discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnulib-bounces+normalperson=yhbt.net@gnu.org Sender: bug-gnulib-bounces+normalperson=yhbt.net@gnu.org --Apple-Mail=_D61006EF-6477-438E-AF80-9CB91DFC5937 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii > On 20 Jan 2023, at 03:40, Paul Eggert wrote: >=20 > On 1/19/23 13:30, Sam James wrote: >> Right, I just meant that we don't tend to care about quieting = warnings with older compilers, >> and it's not useful from a static analysis perspective here either = given that older Clangs can't be trusted. >> It is of course useful as an attribute in general. I don't think = either of these things are really >> a downside to committing the workaround here. If we get folks who get = build failures with extra warnings >> enabled, we can tell them to upgrade their compiler. >=20 > But clang 16 isn't out yet, so we can't reasonably tell people to = upgrade. >=20 > And even if it clang 16 were out, I can't reasonably tell all Emacs = developers to switch to it right away. Many of them are using Apple's = compiler and will upgrade whenever. Plain './configure; make' on a = bleeding-edge Emacs built from Git with Clang 15 would generate 270 = false alarms if we simply did "#define _Noreturn /**/", and I expect = many Emacs developers would be annoyed by that (or would stop paying = attention to any correct diagnostics mixed in with the flood of false = positives). >=20 I take your point and it's fair enough. Thanks for hashing it out with = me. > With that in mind, how about the attached Gnulib patch? (I haven't = installed it.) The basic idea is to "#define _Noreturn /**/" on buggy = clangs if a cautious builder compiles with = -D_GL_WORK_AROUND_LLVM_BUG_5979.<0001-snippet-_Noreturn-work-around-Clang-= _Noreturn-bug.patch> If it's not too much of a hassle, this works for me, because at least we = advertise the problem a bit, and we can tell distros to set -D_... if they're stuck on older Clang for a bit. Cheers Paul. Best, sam --Apple-Mail=_D61006EF-6477-438E-AF80-9CB91DFC5937 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- iNUEARYKAH0WIQQlpruI3Zt2TGtVQcJzhAn1IN+RkAUCY8oWeV8UgAAAAAAuAChp c3N1ZXItZnByQG5vdGF0aW9ucy5vcGVucGdwLmZpZnRoaG9yc2VtYW4ubmV0MjVB NkJCODhERDlCNzY0QzZCNTU0MUMyNzM4NDA5RjUyMERGOTE5MAAKCRBzhAn1IN+R kCWmAQD0WDnnzeNCqi+tVMcEEvQjkxCFlAz498EzAhxHNtE7KwD9HNxSbbIxrJoe BiBHm3Qurruj+3YdGvZLAfaFVqbjiAc= =9fpP -----END PGP SIGNATURE----- --Apple-Mail=_D61006EF-6477-438E-AF80-9CB91DFC5937--