From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 69450 invoked by alias); 18 Sep 2019 15:16:18 -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 69379 invoked by uid 89); 18 Sep 2019 15:16:18 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-6.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS autolearn=ham version=3.3.1 spammy=blog, quality X-HELO: gateway31.websitewelcome.com Received: from gateway31.websitewelcome.com (HELO gateway31.websitewelcome.com) (192.185.144.95) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 18 Sep 2019 15:16:16 +0000 Received: from cm17.websitewelcome.com (cm17.websitewelcome.com [100.42.49.20]) by gateway31.websitewelcome.com (Postfix) with ESMTP id 6640B1056B for ; Wed, 18 Sep 2019 10:16:14 -0500 (CDT) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id Abgki95bR90onAbgkir0mb; Wed, 18 Sep 2019 10:16:14 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=Bo7hfMcYRjFgqYj/UYkNPfNXX3m0C7v/okbhkkYNGZg=; b=RdFE/CObLtrU8n4YNZzJtBgd+k 6TGKGh70swK5BrnCN+TkMzhwLmkgaUGdqEMWM2ZHHlh4gT8o4EUcyzo75xz6YitGUD+Im6fr1iww2 XG96qwpmbc/KLB2816YeYr2y4; Received: from [71.218.73.27] (port=42752 helo=murgatroyd) by box5379.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92) (envelope-from ) id 1iAbgj-001EUY-Vv; Wed, 18 Sep 2019 10:16:14 -0500 From: Tom Tromey To: Bernd Edlinger Cc: "gcc\@gcc.gnu.org" Subject: Re: Adding -Wshadow=local to gcc build rules References: Date: Wed, 18 Sep 2019 15:16:00 -0000 In-Reply-To: (Bernd Edlinger's message of "Wed, 18 Sep 2019 13:08:50 +0000") Message-ID: <87y2yltz2d.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SW-Source: 2019-09/txt/msg00131.txt.bz2 >>>>> "Bernd" == Bernd Edlinger writes: Bernd> I'm currently trying to add -Wshadow=local to the gcc build rules. Bernd> I started with -Wshadow, but gave up that idea immediately. Bernd> As you could expect the current code base has plenty of shadowed Bernd> local variables. Most are trivial to resolve, some are less trivial. Bernd> I am not finished yet, but it is clear that it will be a rather big Bernd> patch. Bernd> I would like to ask you if you agree that would be a desirable step, Bernd> in improving code quality in the gcc tree. We did this in gdb and it was worthwhile. According to my notes, it found 3 real bugs (though one was by chance). You can see what else we tried here: https://tromey.com/blog/?p=1035 Tom