From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15193 invoked by alias); 6 Aug 2012 17:18:45 -0000 Received: (qmail 15177 invoked by uid 22791); 6 Aug 2012 17:18:43 -0000 X-SWARE-Spam-Status: No, hits=-2.7 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE X-Spam-Check-By: sourceware.org Received: from mail-wg0-f41.google.com (HELO mail-wg0-f41.google.com) (74.125.82.41) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 06 Aug 2012 17:18:29 +0000 Received: by wgbds1 with SMTP id ds1so1623662wgb.0 for ; Mon, 06 Aug 2012 10:18:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-originating-ip:in-reply-to:references:date :message-id:subject:from:to:cc:content-type:x-gm-message-state; bh=sgI9HC0qaNn+U0ydKhELbmFfgDzxdzByvKrZRp5PXF8=; b=N8ZdihMSor7LZwHqWHp+OW1hY50ckt0xS/gHp2medz/3Jq+3SBuMHJF/53cCl73P0O zSuvGaw1vcR1R5P4RZ2ZxiMncad0KhBDGHs99N1l5NVwTKU/5n4+Zf0tNKwAyto8ceEo 1T1GDWm284B02JvTFOdssAuKqjMqo8PvroTyyMLyJN9H+LeTKtpkcnSnXK5DxtPWr1ov k2426zZtFwc/Rj840je24j8W6Q9Lwru5Q7wUhfdD6xJzyxvIx9tJwdtL1D6xMRSoXilJ s/4+9QdND8CC6xz87QT43iwg1Wu1p7cIXtNxhAR8/6gsyWyKweLFXaWfQFVj3aE/B+l5 f5BQ== MIME-Version: 1.0 Received: by 10.180.109.129 with SMTP id hs1mr20156823wib.0.1344273508554; Mon, 06 Aug 2012 10:18:28 -0700 (PDT) Received: by 10.216.137.157 with HTTP; Mon, 6 Aug 2012 10:18:28 -0700 (PDT) In-Reply-To: <877gtckskw.fsf@fleche.redhat.com> References: <877gtckskw.fsf@fleche.redhat.com> Date: Mon, 06 Aug 2012 17:18:00 -0000 Message-ID: Subject: Re: Refactor tdep-i386.c to fix all -Wshadow warnings From: Goncalo Gomes To: Tom Tromey Cc: gdb-patches@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 X-Gm-Message-State: ALoCoQn0jCDm6uVmUfX3Q1sUPRgZpp6HlpyGqatEbVdqEo9zCLLYbd5xQ7J+3NfaIX9eKtnBwRGY X-IsSubscribed: yes 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/msg00185.txt.bz2 On Mon, Aug 6, 2012 at 3:23 PM, Tom Tromey wrote: >>>>>> "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. Thanks for this piece of advice! I'll look into some bugs or re-consider a larger feature set going forward (though, I still need to work out the copyright assignment paperwork.) -- Goncalo http://promisc.org/