From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12469 invoked by alias); 9 Aug 2012 09:21:09 -0000 Received: (qmail 12461 invoked by uid 22791); 9 Aug 2012 09:21:09 -0000 X-SWARE-Spam-Status: No, hits=-2.9 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from sibelius.xs4all.nl (HELO glazunov.sibelius.xs4all.nl) (83.163.83.176) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 09 Aug 2012 09:20:51 +0000 Received: from glazunov.sibelius.xs4all.nl (kettenis@localhost [127.0.0.1]) by glazunov.sibelius.xs4all.nl (8.14.5/8.14.3) with ESMTP id q799Kk6c007499; Thu, 9 Aug 2012 11:20:46 +0200 (CEST) Received: (from kettenis@localhost) by glazunov.sibelius.xs4all.nl (8.14.5/8.14.3/Submit) id q799Kh8Q021002; Thu, 9 Aug 2012 11:20:43 +0200 (CEST) Date: Thu, 09 Aug 2012 09:21:00 -0000 Message-Id: <201208090920.q799Kh8Q021002@glazunov.sibelius.xs4all.nl> From: Mark Kettenis To: tromey@redhat.com CC: goncalo@promisc.org, gdb-patches@sourceware.org In-reply-to: <877gtckskw.fsf@fleche.redhat.com> (message from Tom Tromey on Mon, 06 Aug 2012 08:23:11 -0600) Subject: Re: Refactor tdep-i386.c to fix all -Wshadow warnings References: <877gtckskw.fsf@fleche.redhat.com> 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/msg00285.txt.bz2 > From: Tom Tromey > Date: Mon, 06 Aug 2012 08:23:11 -0600 > > >>>>> "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. Right. In particular the case where a local variable "shadows" a global function. Until GCC stops warning about those cases I think we should leave the -Wshadow issue alone.