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 BBC043855583 for ; Fri, 12 May 2023 21:29:14 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org BBC043855583 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: <87y1lx1avj.fsf@oldenburg.str.redhat.com> <83ednoapb6.fsf@gnu.org> <831qjoa0g0.fsf@gnu.org> <83o7ms8is7.fsf@gnu.org> <2ffbf210-1b58-737b-888c-4f84c5cc5e0f@gmail.com> <837ctg8e98.fsf@gnu.org> <83wn1g6w67.fsf@gnu.org> <83mt2c6tch.fsf@gnu.org> <871qjlh9t3.fsf@mid.deneb.enyo.de> User-agent: mu4e 1.10.3; emacs 29.0.90 From: Sam James To: Florian Weimer Cc: Joseph Myers , Eli Zaretskii , Jakub Jelinek , gabravier@gmail.com, jwakely.gcc@gmail.com, fweimer@redhat.com, arsen@aarsen.me, gcc@gcc.gnu.org Subject: Re: More C type errors by default for GCC 14 Date: Fri, 12 May 2023 22:21:18 +0100 In-reply-to: <871qjlh9t3.fsf@mid.deneb.enyo.de> Message-ID: <87ttwh44t6.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; charset=utf-8 Content-Transfer-Encoding: quoted-printable Florian Weimer writes: > [...] > In summary, all these seems to be good candidates for errors by default: > > * int-conversion as errors (already raised separately > * -Wint-conversion for ?: > * parameter names in non-prototype function declarations > * the union wait function pointer compatibility kludge > * return-with-out-value for non-void functions > * -Wincomatible-pointer-types warning for ?: (but no error yet, see below) > > This are more =E2=80=9Cmaybe=E2=80=9C: > > * incompatible-pointer-types as errors (already raised separately) > * int-conversion and incompatible-pointer-types in comparisons > * return with value in a function returning void =2DWreturn-type tends to bite people with C++. Obviously the behaviour is different for C, but it's a serious code smell. I've been playing with it for C for a while and I don't get that many hits with it of this type. > * dereferencing void * > * taking the address of void I think I've seen these but they've been accompanied by other issues. > * "function types not truly compatible in ISO C" > and "types are not quite compatible" (depending on what they actually m= ean) > * qualifier mismatches (may need separate opt-out) This has been common for func. ptrs. but not too bad. I haven't got any data on other cases but am a bit worried about how noisy it'll be for those. > * sign mismatches in pointers (definitely needs separate opt-out) > --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iOUEARYKAI0WIQQlpruI3Zt2TGtVQcJzhAn1IN+RkAUCZF6vpV8UgAAAAAAuAChp c3N1ZXItZnByQG5vdGF0aW9ucy5vcGVucGdwLmZpZnRoaG9yc2VtYW4ubmV0MjVB NkJCODhERDlCNzY0QzZCNTU0MUMyNzM4NDA5RjUyMERGOTE5MA8cc2FtQGdlbnRv by5vcmcACgkQc4QJ9SDfkZAv1gD/QDCZjNbyEaFAKuFVBjNJEtgP7y3vdEGN8NOF Csc59BwA/jhotO/G1YYhflyZBVeWbyMR8asiRBZsp/e317fX+7oO =wPNa -----END PGP SIGNATURE----- --=-=-=--