From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-qk1-f174.google.com (mail-qk1-f174.google.com [209.85.222.174]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 64520C421 for ; Tue, 15 Nov 2022 23:43:03 +0000 (UTC) Received: by mail-qk1-f174.google.com with SMTP id s20so10650483qkg.5 for ; Tue, 15 Nov 2022 15:43:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kitware.com; s=google; h=user-agent:in-reply-to:content-disposition:mime-version:references :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=HVOuBkpxLykIpMacwwPgJw0KdCGH7KasQ5JaihGmSog=; b=kfLv3D1joyQBXHap/pjFLobdUNyfJ7wbAyaAytTdxUAfV0Lrh9iedLV77qGaNvix0/ X5zkHVxf34BD/1L/XDxqNaIhkDj6lbJm2d4K8J7X8SSX3Oqz+V+yohUhnMM8GHM4ba1C 6PRWNQMD+v3ILVGda8WaAog0g++ZsbbgOnAtM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=user-agent:in-reply-to:content-disposition:mime-version:references :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=HVOuBkpxLykIpMacwwPgJw0KdCGH7KasQ5JaihGmSog=; b=M44JFCORtVuok5tN77kkca1j3Qh1SWZEWZvV7ZFqz51Q0+wFTWlMOeGWMd0xNVIrgU OIDji5A514Ae5o9aXoFoPMBQDquChA9iu0G2ogB1EOkKRGRCFd5tVKY1Qk3ZR0QU3Eqc zS2X+jDhlbU4BfUISkFlp2YCnvWHn1SYzQtgXWtpZ6sIcZHmU2Fcqktlxww11x+Jw/3d FTXesRNuXTkPW8dqkqhokO964UBfYuUbwmdrk2RMqFsDDqAxSjtAFOCW83airyesxjvQ uEi0x5sGrqa7e8mAzcYurzbfWQwgmeAA0CVNVNOMPmA2bGFbLDnUvK9jWFkKqneIUR0V qVUQ== X-Gm-Message-State: ANoB5plF/DM5jcdO2p0DmBqEWKdYDkky+gX0gwUZ5qdptoEObz9KT/Yy w/ofaZ5DgW6giqwcEcMx0zonXg== X-Google-Smtp-Source: AA0mqf7dG6LPMTGugGX1IkOqAYQjhupV4fBUcU/RU6vkOYLsPpkUumNo6JuCiQ18EnJTyJWJoiBKnA== X-Received: by 2002:a05:620a:222b:b0:6ea:39ec:e50f with SMTP id n11-20020a05620a222b00b006ea39ece50fmr17263705qkh.571.1668555782196; Tue, 15 Nov 2022 15:43:02 -0800 (PST) Received: from localhost (cpe-142-105-146-128.nycap.res.rr.com. [142.105.146.128]) by smtp.gmail.com with ESMTPSA id bn29-20020a05620a2add00b006e16dcf99c8sm8775869qkb.71.2022.11.15.15.43.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Nov 2022 15:43:01 -0800 (PST) Date: Tue, 15 Nov 2022 18:43:00 -0500 From: Ben Boeckel To: Paul Eggert Cc: Aaron Ballman , Jonathan Wakely , Zack Weinberg , c-std-porting@lists.linux.dev, autoconf@gnu.org, gcc@gcc.gnu.org, cfe-commits@lists.llvm.org, Gnulib bugs Subject: Re: How can Autoconf help with the transition to stricter compilation defaults? Message-ID: References: <7ef0ce03-d908-649a-a6ee-89fea374d2b1@cs.ucla.edu> <9cb106e9-16ff-65ec-6a44-6567c77521dc@cs.ucla.edu> <06a5d2cd-44eb-7404-17f3-ff64dd505427@cs.ucla.edu> <7ee13f9a-f3e9-8b0b-2b02-64527227fcc1@cs.ucla.edu> Precedence: bulk X-Mailing-List: c-std-porting@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <7ee13f9a-f3e9-8b0b-2b02-64527227fcc1@cs.ucla.edu> User-Agent: Mutt/2.2.7 (2022-08-07) On Tue, Nov 15, 2022 at 15:09:19 -0800, Paul Eggert wrote: > This may be a hack, but it's a *good* hack. It's likely to fix > real-world bugs that would be caused if Clang becomes overly pedantic by > default here. And the probability of introducing real-world bugs is > essentially zero. FWIW, CMake uses the same signature for detecting whether a function exists or not: https://gitlab.kitware.com/cmake/cmake/-/blob/master/Modules/CheckFunctionExists.c It's also been like this (without the `void`) for 20 years; the `void` argument was added 6 years ago: https://gitlab.kitware.com/cmake/cmake/-/commits/master/Modules/CheckFunctionExists.c --Ben