From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) by sourceware.org (Postfix) with ESMTPS id 037733858C66 for ; Sat, 12 Nov 2022 02:58:08 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 037733858C66 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=owlfolio.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=owlfolio.org Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 257005C0051; Fri, 11 Nov 2022 21:58:06 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Fri, 11 Nov 2022 21:58:06 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=owlfolio.org; h= cc:cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm3; t=1668221886; x= 1668308286; bh=YCwbwQ94WVRhDS80UCZcCFNU7GpJQ8DACRbDHmEo2I0=; b=W 1oyWHfkBhx4UUbgJTMP4W6HTWn65WCXdY+WHz4ARQJegcXWl6KMf/Qv7CjyWlvIm ftaL6GeuUpr5OfmfMc/iR4KX4jeVIiJrNYy505GAvGkJKQEf0LhkR/kKZqdOf5VA cuaFqU5VV5x3c54dBqoT1DKRvSxlw5+vgoNFj3O0ORfiqhBOPtEV86CqxB7JY08X WQgleaY0B37DX7qCDosEPfy0uppopJGSelwEV7SFqHu0ESq+JmoiD8x79LzXZ02O ITMRoCcQ8TuV8oSE8vguaISn9P/oUTMRx+4h8EfQrme4Yw1Q8uukxRFUd9O79/LX QoG4JcFP9AEsk/Z3mTckA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1668221886; x= 1668308286; bh=YCwbwQ94WVRhDS80UCZcCFNU7GpJQ8DACRbDHmEo2I0=; b=t t6LrDSCkizSSfl1xFqn4Ipm9+7xJu+j3Rm/hhSXDhDCIN0K6yYT3d72VfjVZTjFO fb10+uh03AI/GZLW97Ic0AkNNuSNpaukJyIfXffAcAn6n0EcMLqfcKzlUETQxaX6 I1QbawnmZrHvoAPxRY2tM0HTl97sCL57OmjgJ+zsmolTnQBwDaE1XmqQac5aJesz kKWBSRSMH290JLGv9s4QLLGF3NQzq0wvpHnOtfrxtpGa6n+ChzOgoV3agG9tePnk o1E+ZVIwIlVkJC/1rw2dYhmVqBhjcopqEq/iDstQCWA2Xzya9FOBpAs48tiD8BRh PKjnNCOdyp9BViIozh6Ow== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvgedrfeejgdehvdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvfevufhfffgjkfgfgggtgfesthhqredttderjeenucfhrhhomhepkggrtghk ucghvghinhgsvghrghcuoeiirggtkhesohiflhhfohhlihhordhorhhgqeenucggtffrrg htthgvrhhnpefhvdevuefgjeeuheegfeejhefhheegkeejhfejhffgveduhfehjefggfel fffgheenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe iirggtkhesohiflhhfohhlihhordhorhhg X-ME-Proxy: Feedback-ID: i876146a2:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 11 Nov 2022 21:58:05 -0500 (EST) From: Zack Weinberg To: Nick Bowler Cc: c-std-porting@lists.linux.dev, autoconf@gnu.org, gcc@gcc.gnu.org Subject: Re: How can Autoconf help with the transition to stricter compilation defaults? References: <24ed5604-305a-4343-a1b6-a789e4723849@app.fastmail.com> Date: Fri, 11 Nov 2022 21:56:47 -0500 In-Reply-To: (Nick Bowler's message of "Thu, 10 Nov 2022 12:52:03 -0500") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,JMQ_SPF_NEUTRAL,RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Nick Bowler writes: > My gut feeling is that Autoconf should just determine the necessary > options to get compatible behaviour out of these modern compilers, at > least for the purpose of running configure tests. For example, Autoconf > should probably build the AC_CHECK_FUNC programs using gcc's > -fno-builtin option I fear this will cause more problems than it solves. Messing with compiler options inside a configure script has a track record of clashing with =E2=80=9Couter=E2=80=9D build tools that expect to be able to= dictate the options. > It saddens me to see so much breakage happening in "modern C", a > language that has (until now) a long history of new language features > being carefully introduced to avoid these sort of problems. I don=E2=80=99t exactly _disagree_ with this. Quite a few of the compatibi= lity- breaking changes going into C2x (promoting =E2=80=98bool=E2=80=99 to a true= keyword, for instance, and changing the meaning of an empty argument list in a function declaration) strike me as unnecessary churn. However, the specific set of changes that are under discussion right now=E2=80=94removal= of implicit function declarations, implicit int, and old-style function definitions from the _default_ language accepted by C compilers=E2=80=94I= =E2=80=99m very much in favor of, because they make life significantly easier for people writing _new_ code. It=E2=80=99s not healthy for a language to always prioritize old code over new code. (Yes, you _can_ opt in to all three of those changes now, but you have to type a bunch of -W options. With my day job hat on, I am very much looking forward to a day where =E2=80=98cc test.c=E2=80=99 errors out on im= plicit function declarations, because then I won=E2=80=99t have to _explain_ impli= cit function declarations, and why they are dangerous, to my students anymore.) >> p.s. GCC and Clang folks: As long as you=E2=80=99re changing the default= s out >> from under people, can you please also remove the last few predefined >> user-namespace macros (-Dlinux, -Dunix, -Darm, etc) from all the >> -std=3DgnuXX modes? > > Meh, even though these macros are a small thing I don't accept the > "things are breaking anyway so let's break even more things" attitude. Getting rid of these is another change that will make life easier for people writing new code. zw