From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ciao.gmane.io (ciao.gmane.io [116.202.254.214]) by sourceware.org (Postfix) with ESMTPS id 0D6E5385414A for ; Wed, 10 May 2023 08:49:40 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0D6E5385414A Authentication-Results: sourceware.org; dmarc=fail (p=quarantine dis=none) header.from=westcontrol.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=m.gmane-mx.org Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1pwfVy-0000kQ-W4 for gcc@gcc.gnu.org; Wed, 10 May 2023 10:49:38 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: gcc@gcc.gnu.org From: David Brown Subject: Re: More C type errors by default for GCC 14 Date: Wed, 10 May 2023 10:49:32 +0200 Message-ID: References: <877cth66qb.fsf@oldenburg.str.redhat.com> <20230509102201.6aa2a7d14fdb2f1e7abff449@killthe.net> <87r0rp5uf8.fsf@aarsen.me> <83ttwla1ep.fsf@gnu.org> <83lehx9vix.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.0 Content-Language: en-GB In-Reply-To: <83lehx9vix.fsf@gnu.org> X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,FORGED_MUA_MOZILLA,HEADER_FROM_DIFFERENT_DOMAINS,KAM_DMARC_STATUS,KAM_NUMSUBJECT,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham 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 09/05/2023 21:04, Eli Zaretskii via Gcc wrote: >> From: Jonathan Wakely >> Date: Tue, 9 May 2023 18:15:59 +0100 >> Cc: Arsen Arsenović , gcc@gcc.gnu.org >> >> On Tue, 9 May 2023 at 17:56, Eli Zaretskii wrote: >>> >>> No one has yet explained why a warning about this is not enough, and >>> why it must be made an error. Florian's initial post doesn't explain >>> that, and none of the followups did, although questions about whether >>> a warning is not already sufficient were asked. >>> >>> That's a simple question, and unless answered with valid arguments, >>> the proposal cannot make sense to me, at least. >> >> People ignore warnings. That's why the problems have gone unfixed for >> so many years, and will continue to go unfixed if invalid code keeps >> compiling. > > People who ignore warnings will use options that disable these new > errors, exactly as they disable warnings. So we will end up not > reaching the goal, but instead harming those who are well aware of the > warnings. > My experience is that many of the people who ignore warnings are not particularly good developers, and not particularly good at self-improvement. They know how to ignore warnings - the attitude is "if it really was a problem, the compiler would have given an error message, not a mere warning". They don't know how to disable error messages, and won't bother to find out. So they will, in fact, be a lot more likely to fix their code. > IOW, if we are targeting people for whom warnings are not enough, then > we have already lost the battle. Discipline cannot be forced by > technological means, because people will always work around. > Agreed. But if we can make it harder for them to release bad code, that's good overall. Ideally, I'd like the compiler to email such people's managers with a request that they be sent on programming courses!