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 8F831395C02F for ; Wed, 16 Nov 2022 18:17:21 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 8F831395C02F 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 D64C1160040; Wed, 16 Nov 2022 10:17:19 -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 xuQg3S1pTKFB; Wed, 16 Nov 2022 10:17:19 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 0E2FE160041; Wed, 16 Nov 2022 10:17:19 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.9.2 zimbra.cs.ucla.edu 0E2FE160041 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cs.ucla.edu; s=78364E5A-2AF3-11ED-87FA-8298ECA2D365; t=1668622639; bh=ZAyVqVeh7p/byzRUbNV7o3dzyHfJ7wjXr+N4++3OUBk=; h=Message-ID:Date:MIME-Version:To:From:Subject:Content-Type: Content-Transfer-Encoding; b=O2mXQpVJi+26cP09ErhiS9uzCll5kanT7reMFKUEx2fC80ovZGh+xu/IlC2zdtsEE M/1LnM9dkoTqxv7aHINTd5ZhGqk4Q1ZBj9KcjRfjetcz/8CgH+s/u0grDXfEP11RCE ssfJ09G9nPSOPo7Tz+Hf0Tsfo0f+7U+e29duEGYE= 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 9Tt-IrDYvE_C; Wed, 16 Nov 2022 10:17:18 -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 BFB84160040; Wed, 16 Nov 2022 10:17:18 -0800 (PST) Message-ID: <4cfa16b3-e9e0-0ec0-659c-e4aef6090995@cs.ucla.edu> Date: Wed, 16 Nov 2022 10:17:18 -0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Content-Language: en-US To: Michael Matz Cc: Jonathan Wakely , Aaron Ballman , 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> <251923e7-57be-1611-be10-49c3067adf0d@cs.ucla.edu> <7ef0ce03-d908-649a-a6ee-89fea374d2b1@cs.ucla.edu> <9cb106e9-16ff-65ec-6a44-6567c77521dc@cs.ucla.edu> <06a5d2cd-44eb-7404-17f3-ff64dd505427@cs.ucla.edu> From: Paul Eggert Organization: UCLA Computer Science Department Subject: Re: How can Autoconf help with the transition to stricter compilation defaults? In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.2 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-16 06:26, Michael Matz wrote: > char foobar(void); > int main(void) { > return &foobar !=3D 0; > } That still has undefined behavior according to draft C23, which says=20 behavior is undefined when foobar is (say) 'memset_explicit' because the=20 declaration 'char memset_explicit(void);' disagrees with draft C23's=20 declaration of 'memset_explicit'. It doesn't matter whether there's a=20 call to 'memset_explicit'. See draft C23 =C2=A76.2.7, which says "All=20 declarations that refer to the same object or function shall have=20 compatible type; otherwise, the behavior is undefined." If Clang's threatened pickiness were of some real use elsewhere, it=20 might be justifiable for default Clang to break Autoconf. But so far we=20 haven't seen real-world uses that would justify this pickiness for=20 Autoconf's use of 'char memset_explicit(void);'.