From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 61106 invoked by alias); 18 Sep 2019 13:39:05 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 61096 invoked by uid 89); 18 Sep 2019 13:39:04 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-5.5 required=5.0 tests=AWL,BAYES_00,SPF_PASS autolearn=ham version=3.3.1 spammy=HX-Languages-Length:737, H*f:sk:AM6PR10, H*i:sk:AM6PR10, quality X-HELO: mx1.suse.de Received: from mx2.suse.de (HELO mx1.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 18 Sep 2019 13:39:03 +0000 Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id E773EB697; Wed, 18 Sep 2019 13:39:01 +0000 (UTC) Subject: Re: Adding -Wshadow=local to gcc build rules To: Bernd Edlinger , "gcc@gcc.gnu.org" References: From: =?UTF-8?Q?Martin_Li=c5=a1ka?= Message-ID: <625f6d34-4dbc-5492-53c7-a7706f4dd23f@suse.cz> Date: Wed, 18 Sep 2019 13:39:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2019-09/txt/msg00130.txt.bz2 On 9/18/19 3:08 PM, Bernd Edlinger wrote: > Hi, > > I'm currently trying to add -Wshadow=local to the gcc build rules. > I started with -Wshadow, but gave up that idea immediately. > > As you could expect the current code base has plenty of shadowed > local variables. Most are trivial to resolve, some are less trivial. > I am not finished yet, but it is clear that it will be a rather big > patch. > > I would like to ask you if you agree that would be a desirable step, > in improving code quality in the gcc tree. > > > Thanks > Bernd. > Hello. I did the very same for godot project some time ago: https://github.com/godotengine/godot/pull/25853 I fully support such a patch. Martin