From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11169 invoked by alias); 6 Aug 2012 14:23:29 -0000 Received: (qmail 11157 invoked by uid 22791); 6 Aug 2012 14:23:28 -0000 X-SWARE-Spam-Status: No, hits=-6.5 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 06 Aug 2012 14:23:14 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q76ENC5Y025328 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 6 Aug 2012 10:23:12 -0400 Received: from barimba (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q76ENBSL014704 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Mon, 6 Aug 2012 10:23:12 -0400 From: Tom Tromey To: Goncalo Gomes Cc: gdb-patches@sourceware.org Subject: Re: Refactor tdep-i386.c to fix all -Wshadow warnings References: Date: Mon, 06 Aug 2012 14:23:00 -0000 In-Reply-To: (Goncalo Gomes's message of "Sun, 5 Aug 2012 23:24:04 +0100") Message-ID: <877gtckskw.fsf@fleche.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2012-08/txt/msg00171.txt.bz2 >>>>> "Goncalo" == Goncalo Gomes writes: Goncalo> The attached patch fixes all warnings in tdep-i386.c resulting from Goncalo> enabling shadow warnings in gcc. As this is my first contribution to Goncalo> GDB, I decided to keep it short to a single file to obtain feedback. Just a friendly word of warning -- this is arguably the worst project to pick of all the things on the project page (though unfortunately there is more than one stinker on there). It's been attempted a couple of times, had always lead to a lot of contention, etc. That doesn't mean it can't be done, just that you ought to expect it to be a pain. Last time this came up, I think the conclusion was that we'd prefer it if we could get warnings only for some kinds of shadowing, but not all kinds. There was a sense that warnings for shadowing of 'index' was not very useful. I remember some discussion of checking for a GCC change in gdb's configure, but I don't remember the details any more. They're in the archives. Tom