From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from fencepost.gnu.org (fencepost.gnu.org [IPv6:2001:470:142:3::e]) by sourceware.org (Postfix) with ESMTPS id BC0343858C66 for ; Wed, 10 May 2023 12:21:05 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org BC0343858C66 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gnu.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gnu.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=TodV2LkdeztNrVQtPB7xaCDXLi9DaO6kFwRRqRHabDI=; b=p3QnBSvml2iB t6uHsp3JLkGo1lGKSGuWXFpckcqACsWkz7ePXR7ussJh26Amk4WUP9zQIEAoQ7riK2KqxG/gGsZl1 e+yabnpxgEYfHkVQUTfycDnNn5DfTaaJhOvaLT/7/AkdA3e57rayOCymeAwywyLhrq04ji2fHByUF rfqYl4P6njDD7jz3oQZ2UBSiMcz0Q3nBoaPGTip5rWvbdM+ObEl844lvjU2N0vYuRTVey1V4eN7uh 3j+K7BsXmVJHKnjSNem9ZpB5DY7ZE5kci/GqGe6D9RLZNEcuTZP6VjZUK/j1cTSbimvCm+YWK7OJB cpNvjNJi5sFayfqOPTDsnw==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pwioZ-0003JP-85; Wed, 10 May 2023 08:21:05 -0400 Date: Wed, 10 May 2023 15:22:08 +0300 Message-Id: <83r0ro8jgv.fsf@gnu.org> From: Eli Zaretskii To: Jonathan Wakely Cc: david@westcontrol.com, gcc@gcc.gnu.org In-Reply-To: (message from Jonathan Wakely on Wed, 10 May 2023 12:49:52 +0100) Subject: Re: More C type errors by default for GCC 14 References: <877cth66qb.fsf@oldenburg.str.redhat.com> <20230509102201.6aa2a7d14fdb2f1e7abff449@killthe.net> <87r0rp5uf8.fsf@aarsen.me> <83ttwla1ep.fsf@gnu.org> <83lehx9vix.fsf@gnu.org> <83zg6c8lju.fsf@gnu.org> X-Spam-Status: No, score=2.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,KAM_NUMSUBJECT,RCVD_IN_BARRACUDACENTRAL,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Level: ** X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: > From: Jonathan Wakely > Date: Wed, 10 May 2023 12:49:52 +0100 > Cc: David Brown , gcc@gcc.gnu.org > > > If some developers want to ignore warnings, it is not the business of > > GCC to improve them, even if you are right in assuming that they will > > not work around errors like they work around warnings (and I'm not at > > all sure you are right in that assumption). But by _forcing_ these > > errors on _everyone_, GCC will in effect punish those developers who > > have good reasons for not changing the code. > > There will be options you can use to continue compiling the code > without changing it. You haven't given a good reason why it's OK for > one group of developers to have to use options to get their desired > behaviour from GCC, but completely unacceptable for a different group > to have to use options to get their desired behaviour. > > This is just a change in defaults. A change in defaults that is not backward-compatible should only be done for very good reasons, because it breaks something that was working for years. No such good reasons were provided. And no, educating/forcing GCC users to use more modern dialect of C is not a good reason. > Accepting broken code by default is not a priori a good thing, as > you seem to insist. Rejecting it by default is not a priori a good > thing. There is a pragmatic choice to be made, and your argument is > still no more than "it compiles today, so it should compile > tomorrow". Once again: it isn't "broken code". It is dangerous code, and in some cases unintentionally suspicious code. But it isn't broken, because GCC can compile it into a valid program, which, if the programmer indeed meant that, will work and do its job. > > > Agreed. But if we can make it harder for them to release bad code, > > > that's good overall. > > > > I'm okay with making it harder, but without making it too hard for > > those whose reasons for not changing the code are perfectly valid. > > This proposal crosses that line, IMNSHO. > > Where "too hard" means using a compiler option. Seriously? This seems farcical. This goes both ways, of course. GCC had -Werror since about forever.