From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from zimbra.cs.ucla.edu (zimbra.cs.ucla.edu [131.179.128.68]) by sourceware.org (Postfix) with ESMTPS id 7BEA53858D3C for ; Thu, 10 Nov 2022 20:19:25 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 7BEA53858D3C Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=cs.ucla.edu Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=cs.ucla.edu Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 782A6160046; Thu, 10 Nov 2022 12:19:24 -0800 (PST) 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 ak03MExyOzt4; Thu, 10 Nov 2022 12:19:23 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id A6D80160047; Thu, 10 Nov 2022 12:19:23 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.9.2 zimbra.cs.ucla.edu A6D80160047 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cs.ucla.edu; s=78364E5A-2AF3-11ED-87FA-8298ECA2D365; t=1668111563; bh=jFDRd1ReSZzDDTMeqbh9Ty3Y8yxzSpdnmmw1dqgxIVQ=; h=Message-ID:Date:MIME-Version:To:From:Subject:Content-Type: Content-Transfer-Encoding; b=cNswh52cYdR/MpNH81p8YQ2fYsJOHc7klDvOjOP232P3R+fjqyvmdhi9tUNYcQMNZ /cEhch4DDJl3S1oU+0V9o9CQ5OlpxO+WZ5dYxXZ5cOB7X8uix4Vvhm4Xx+aIN3WnsY SAux6/EA+AYM85uIMXR0CKcGNg80S4LxfzG8Azc4= X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu 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 vQmClhPSDQrn; Thu, 10 Nov 2022 12:19:23 -0800 (PST) Received: from [192.168.1.9] (cpe-172-91-119-151.socal.res.rr.com [172.91.119.151]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 7063C160046; Thu, 10 Nov 2022 12:19:23 -0800 (PST) Message-ID: <0e07ba76-89be-2fa3-6ae3-88958d749cfe@cs.ucla.edu> Date: Thu, 10 Nov 2022 12:19:23 -0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.3.3 Content-Language: en-US To: Zack Weinberg , c-std-porting@lists.linux.dev, autoconf@gnu.org, gcc@gcc.gnu.org, cfe-commits@lists.llvm.org, Gnulib bugs References: <24ed5604-305a-4343-a1b6-a789e4723849@app.fastmail.com> From: Paul Eggert Organization: UCLA Computer Science Department Subject: Re: How can Autoconf help with the transition to stricter compilation defaults? In-Reply-To: <24ed5604-305a-4343-a1b6-a789e4723849@app.fastmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,JMQ_SPF_NEUTRAL,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 2022-11-10 09:16, Zack Weinberg wrote: > Changes to handle C23 built-in =E2=80=98bool=E2=80=99 better are under = development but > the design has not yet been finalized. [I'm cc'ing this to bug-gnulib too.] To my mind this is the biggest outstanding issue in Autoconf as far as=20 C23 goes, as the upgrade path for Autoconf's existing bool support is=20 not entirely clear. As Florian mentioned, distros can't assume Autoconf=20 upgrades when building other packages; that being said, we should get=20 Autoconf's bool support fixed sooner rather than later as bool hassles=20 will remain until Autoconf is fixed and these fixes are propagated to=20 Autoconf's users. Here's the main Autoconf issue issue with bool. Traditionally, Autoconf=20 supported K&R C, C89, C99, etc. At some point (I'm not sure when),=20 Autoconf started requiring C89 or later. Is it now OK for Autoconf to=20 require C99 or later, as far as bool is concerned? If so, that'll=20 considerably simplify the ongoing maintenance hassle for bool. Requiring C99-or-later bool is the option that Gnulib has taken. Its=20 'stdbool' module and its gl_C_BOOL macro assumes C99 or later, and as=20 far as I know no Gnulib-using package is using Gnulib's 'stdbool-c99'=20 module which we kept around in case somebody still needed bool to work=20 atop a C89 system. (We considered supporting C23 bool atop C89 but it=20 was too painful.) If we follow Gnulib's lead, Autoconf will generate a config.h that does=20 "#include " on pre-C23 systems, and this config.h will not=20 not work on pre-C99 systems. This of course could in theory break some=20 programs, just as compiling them with C23 can break them. But I don't=20 see any better option at this point. And besides, what package outside=20 of a museum still requires C89 and don't work with C99?