From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ej1-x62a.google.com (mail-ej1-x62a.google.com [IPv6:2a00:1450:4864:20::62a]) by sourceware.org (Postfix) with ESMTPS id 88FB438A90B6 for ; Tue, 15 Nov 2022 19:28:08 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 88FB438A90B6 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ej1-x62a.google.com with SMTP id kt23so38616100ejc.7 for ; Tue, 15 Nov 2022 11:28:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=8PiOeFCRK50hAckuGQqfWl4yMxIEqFt3NkyQOcv1swY=; b=Uwfhm9v60CsdDl5Fp7GfQb/Bdc7h71SFLKbdanVJ1b+tAgcEnrSTC4FRw06x0R455p PlsW4EzmwYfjbVi4pbPj785YedsKGnOaV2bu1bU2FCHd3M5pV8VHgLrR9mI769R1d2TH r7sLcmEp5bkj+raos1CCyxJZJUVj8+OTdsOYEsOEEm5uIKAsVt5Y3pTb0yY16CAVMPZB nWabgqdY3/ZXiqPAd5RA7jbCAuzhQo0xI+5C5myxKhbWgpXsCH440K9B3o2PmahuIKX4 7pOftL49q+SeyqnDYNThwQEMDNyFuo8BnFgQ8aPXaeD7Q42LbD9sOlDhutwlP8hUv2wg echg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=8PiOeFCRK50hAckuGQqfWl4yMxIEqFt3NkyQOcv1swY=; b=CHfFu0QggkDWD9rZQpr8JRI5PBGG9TpZMb5hZ9R+vBArPu7wkWWohF7K1tm1Z6gDDK YFMCRZW5nKd/3VCcUTOvJcdT4xQ4jvzUIrekFcJ7CLVqtQyUTHui94e5eO4wGHSfEAqO O0t3IF5N5zAiEBVTqWvN7qCCT5oZVsyxJ5UNYVOLvFJXuRG8lYVufvjBCt3xEuMd4J60 Q2sVqfsNL/9ZLtbzJyj3s6m+g7rRmy+lMdgIMijgZhBBjPwzWsZUwt0/rUzGB3GSzsbv U1N8Kx4UdkS8Ce1ThqliMYEFECKKGPaIcYb4xTIkbefId5/icwdKXXkMbgqoBxhqHC3m qJXQ== X-Gm-Message-State: ANoB5plQpsGidaVuzbrOpuWT+JWOQ2CZY+V6CqJdRjWeHNjbra4N8SSv rVYUqqFlzVCVq40sariSTR25PjQxZzzXeaE7Yvs= X-Google-Smtp-Source: AA0mqf4Ze1qsVCwK2af5reMYhrutyb7WGHNlHRmRymkEGnp/wPk0Hl0ZE9IYGjqnztps6ObD2ztrAMtMjdYJnFjZQtM= X-Received: by 2002:a17:906:3e55:b0:7ad:dd43:5d18 with SMTP id t21-20020a1709063e5500b007addd435d18mr14449397eji.389.1668540487054; Tue, 15 Nov 2022 11:28:07 -0800 (PST) MIME-Version: 1.0 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> <9cb106e9-16ff-65ec-6a44-6567c77521dc@cs.ucla.edu> In-Reply-To: <9cb106e9-16ff-65ec-6a44-6567c77521dc@cs.ucla.edu> From: Jonathan Wakely Date: Tue, 15 Nov 2022 19:27:55 +0000 Message-ID: Subject: Re: How can Autoconf help with the transition to stricter compilation defaults? To: Paul Eggert Cc: Aaron Ballman , Zack Weinberg , c-std-porting@lists.linux.dev, autoconf@gnu.org, gcc@gcc.gnu.org, cfe-commits@lists.llvm.org, Gnulib bugs Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,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: On Tue, 15 Nov 2022 at 19:08, Paul Eggert wrote: > > On 2022-11-15 06:50, Jonathan Wakely wrote: > > Could you clarify what you mean, with a concrete example? Surely as > > long as errors are reported on stderr and the compiler exits with > > non-zero status, that's an acceptable way to report errors? > > Not if the "error" is harmless as far as Autoconf is concerned, which is > what led to this thread. The concrete example here is that Autoconf > needs to check whether a function can be linked to (as opposed to > checking the function's signature). Clang shouldn't get in the way. Another perspective is that autoconf shouldn't get in the way of making the C and C++ toolchain more secure by default. > > In lots of places the C standard says behavior is undefined, even though > the behavior is fine on the current platform for the intended use. It's > not just the example we're talking about; adding zero to a null pointer > is another such example. > > In such cases it's OK for Clang to warn, but having Clang exit with > nonzero status is overkill and counterproductive.