From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.simplesystems.org (smtp.simplesystems.org [65.66.246.90]) by sourceware.org (Postfix) with ESMTPS id 0280539484B6 for ; Wed, 16 Nov 2022 00:08:16 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 0280539484B6 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=simple.dallas.tx.us Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=simple.dallas.tx.us Received: from scrappy.simplesystems.org (scrappy.simplesystems.org [65.66.246.73]) by smtp.simplesystems.org (8.14.4+Sun/8.14.4) with ESMTP id 2AG086te017269; Tue, 15 Nov 2022 18:08:06 -0600 (CST) Date: Tue, 15 Nov 2022 18:08:06 -0600 (CST) From: Bob Friesenhahn X-X-Sender: bfriesen@scrappy.simplesystems.org To: Sam James cc: Paul Eggert , Aaron Ballman , Zack Weinberg , c-std-porting@lists.linux.dev, Autoconf Development , GCC Development , cfe-commits@lists.llvm.org, Gnulib bugs Subject: Re: How can Autoconf help with the transition to stricter compilation defaults? In-Reply-To: <35EC0D15-150F-4325-8FC9-F31E963B328F@gentoo.org> Message-ID: References: <24ed5604-305a-4343-a1b6-a789e4723849@app.fastmail.com> <251923e7-57be-1611-be10-49c3067adf0d@cs.ucla.edu> <7ef0ce03-d908-649a-a6ee-89fea374d2b1@cs.ucla.edu> <35EC0D15-150F-4325-8FC9-F31E963B328F@gentoo.org> User-Agent: Alpine 2.20 (GSO 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (smtp.simplesystems.org [65.66.246.90]); Tue, 15 Nov 2022 18:08:08 -0600 (CST) X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00,KAM_DMARC_STATUS,KAM_INFOUSMEBIZ,SPF_HELO_PASS,SPF_PASS 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 Tue, 15 Nov 2022, Sam James wrote: > > >> On 13 Nov 2022, at 00:43, Paul Eggert wrote: >> >> On 2022-11-11 07:11, Aaron Ballman wrote: >>> We believe the runtime behavior is sufficiently dangerous to >>> warrant a conservative view that any call to a function will be a call >>> that gets executed at runtime, hence a definitive signature mismatch >>> is something we feel comfortable diagnosing (in some form) by default. >> >> As long as these diagnostics by default do not cause the compiler to exit with nonzero status, we should be OK with Autoconf-generated 'configure' scripts. Although there will be problems with people who run "./configure CFLAGS='-Werror'", that sort of usage has always been problematic and unsupported by Autoconf, so we can simply continue to tell people "don't do that". >> > > Is there somewhere in the autoconf docs we actually say this? > > I've seen a few instances of folks adding it themselves very > early in their configure scripts (which is a pain for distros > anyway) which then ends up affecting the rest. Autoconf can help with this issue due to GCC and some other compilers providing extensions (usually a pragma) to control warnings while compiling the C code. So configure can run without -Werror, but Autoconf could help by providing an easy way for enabling -Werror while compiling the application. Of course the above does not require Autoconf since application developers can figure it out by themselves using preprocessor logic and knowledge of compiler-specific behavior. If Autoconf is able to help, then the convoluted code can be in just one place (in Autoconf). Bob -- Bob Friesenhahn bfriesen@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/ GraphicsMagick Maintainer, http://www.GraphicsMagick.org/ Public Key, http://www.simplesystems.org/users/bfriesen/public-key.txt