From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) by sourceware.org (Postfix) with ESMTP id 353833858417 for ; Mon, 14 Nov 2022 04:36:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 353833858417 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gentoo.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gentoo.org Content-Type: multipart/signed; boundary="Apple-Mail=_764E2725-ECE4-485C-98EA-28C6B7403CC9"; protocol="application/pgp-signature"; micalg=pgp-sha512 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.200.110.1.12\)) Subject: Re: C89isms in the test suite From: Sam James In-Reply-To: <87wn8tbmdr.fsf@oldenburg.str.redhat.com> Date: Mon, 14 Nov 2022 04:36:17 +0000 Cc: GCC Development , c-std-porting@lists.linux.dev Message-Id: References: <87wn8tbmdr.fsf@oldenburg.str.redhat.com> To: Florian Weimer X-Mailer: Apple Mail (2.3731.200.110.1.12) X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00,JMQ_SPF_NEUTRAL,KAM_DMARC_STATUS,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,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: --Apple-Mail=_764E2725-ECE4-485C-98EA-28C6B7403CC9 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii > On 21 Oct 2022, at 09:40, Florian Weimer via Gcc wrote: > > What should we do about these when they are not relevant to what's being > tested? For example, gcc/testsuite/gcc.c-torture/execute/ieee/mzero6.c > has this: > > int main () > { > if (__builtin_copysign (1.0, func (0.0 / -5.0, 10)) != -1.0) > abort (); > exit (0); > } > > but no include files, so abort and exit are implicitly declared. > > Should we inject a header with -include with the most common > declarations (which includes at least abort and exit)? Or add the > missing #include directives? But the latter might not work for > freestanding targets. > > Implicit ints and function declarations without prototypes are also > common (not just for main). > > Other tests look like they might be intended to be built in C89 mode, > e.g. gcc/testsuite/gcc.c-torture/compile/386.c, although it's not > immediately obvious to me what they test. Would you be able to backport 6be2672e4ee41c566a9e072088cccca263bab5f7 and 885b6660c17fb91980b5682514ef54668e544b02 to the active <13 branches? Thanks, sam --Apple-Mail=_764E2725-ECE4-485C-98EA-28C6B7403CC9 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- iNUEARYKAH0WIQQlpruI3Zt2TGtVQcJzhAn1IN+RkAUCY3HFwV8UgAAAAAAuAChp c3N1ZXItZnByQG5vdGF0aW9ucy5vcGVucGdwLmZpZnRoaG9yc2VtYW4ubmV0MjVB NkJCODhERDlCNzY0QzZCNTU0MUMyNzM4NDA5RjUyMERGOTE5MAAKCRBzhAn1IN+R kP5AAQCpSCo7q88xw0nEA7tPRIASMiiprWf8cdG+SceNZiOoKwEA65oHuWNP5oZ2 413XjlX9WsBWpm0JSoarFM/UnXyK6Ao= =g6sq -----END PGP SIGNATURE----- --Apple-Mail=_764E2725-ECE4-485C-98EA-28C6B7403CC9--