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 575823858414 for ; Thu, 11 May 2023 01:35:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 575823858414 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gentoo.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gentoo.org References: <877cth66qb.fsf@oldenburg.str.redhat.com> <87fs83fymj.fsf@yahoo.com> User-agent: mu4e 1.10.3; emacs 29.0.90 From: Sam James To: Po Lu Cc: Jonathan Wakely , gcc@gcc.gnu.org Subject: Re: More C type errors by default for GCC 14 Date: Thu, 11 May 2023 02:33:05 +0100 In-reply-to: <87fs83fymj.fsf@yahoo.com> Message-ID: <87ednnfy57.fsf@gentoo.org> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,JMQ_SPF_NEUTRAL,KAM_DMARC_STATUS,KAM_NUMSUBJECT,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE 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: --=-=-= Content-Type: text/plain Po Lu via Gcc writes: > jwakely.gcc@gmail.com (Jonathan Wakely) writes: > >> This isn't "be like Clang", this is "diagnose things that have been >> invalid C since 1999". > > Only if your definition of valid C is ``strictly conforming to the ISO > Standard''. I doubt there are many programs which fit such a > definition. No, we're talking about "things which ISO C made invalid in 1999, but GCC kept supporting for a while". We're discussing terminating that support. The "standard" part here is not about deference to the standard and claiming extensions can never be made, but rather that we're keeping something which was explicitly removed. > > And anyway, GCC accepts many other constructs which can not be used in a > strictly conforming Standard C programs. For example, the use of dollar > signs in identifiers. Should we not also reject those, identifier names > with external linkage longer than thirty two characters, hex floats, > arithmetic on void pointers, zero-length arrays, statement expressions, > and so on? These aren't things which were in the standard and then got removed because of how terrible they are. They're things that are considered a part of GNU C as proper GNU extensions. Note that, per the rest of the thread, the constructs we're discussing here to be banned are not considered "proper GNU extensions". --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iOUEARYKAI0WIQQlpruI3Zt2TGtVQcJzhAn1IN+RkAUCZFxGZF8UgAAAAAAuAChp c3N1ZXItZnByQG5vdGF0aW9ucy5vcGVucGdwLmZpZnRoaG9yc2VtYW4ubmV0MjVB NkJCODhERDlCNzY0QzZCNTU0MUMyNzM4NDA5RjUyMERGOTE5MA8cc2FtQGdlbnRv by5vcmcACgkQc4QJ9SDfkZDqsQD8Dz1sEaBWGy51aSgOAqkZLJmUa1TAZfeqYyRj E/6Aj2sA/imk/pRdJpdT1nfbXIXwDmAHmgUeJW+0ntl3Kn1wvjwE =aHOg -----END PGP SIGNATURE----- --=-=-=--