From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25645 invoked by alias); 11 Jun 2009 20:37:38 -0000 Received: (qmail 25636 invoked by uid 22791); 11 Jun 2009 20:37:37 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mx2.redhat.com (HELO mx2.redhat.com) (66.187.237.31) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 11 Jun 2009 20:37:32 +0000 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n5BKZU1W028744; Thu, 11 Jun 2009 16:35:30 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n5BKZTb6030664; Thu, 11 Jun 2009 16:35:29 -0400 Received: from opsy.redhat.com (vpn-12-124.rdu.redhat.com [10.11.12.124]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n5BKZSRK023681; Thu, 11 Jun 2009 16:35:28 -0400 Received: by opsy.redhat.com (Postfix, from userid 500) id 31FE2C88051; Thu, 11 Jun 2009 14:35:21 -0600 (MDT) To: Pedro Alves Cc: gdb-patches@sourceware.org Subject: Re: [ob] rename local variable in break_command_really. References: <200906111959.07108.pedro@codesourcery.com> From: Tom Tromey Reply-To: tromey@redhat.com Date: Thu, 11 Jun 2009 20:37:00 -0000 In-Reply-To: <200906111959.07108.pedro@codesourcery.com> (Pedro Alves's message of "Thu\, 11 Jun 2009 19\:59\:06 +0100") Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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: 2009-06/txt/msg00322.txt.bz2 >>>>> "Pedro" =3D=3D Pedro Alves writes: Pedro> I was doing some local debug changes to break_command_really, that Pedro> were introducing a usage of the ALL_BREAKPOINTS macro, and Pedro> mysteriously, the result was failing to compile. Turns out this Pedro> function declares a variable named breakpoint_chain, which is the Pedro> same name of the global ALL_BREAKPOINTS references... Pedro> I've checked this in to hopefully avoid such headaches to Pedro> someone else (maybe me!) in the future. Out of curiosity I tried a build with -Wshadow. That gives more than 500 errors. Unfortunately a lot of them (IMO) are somewhat bogus :(, e.g., a warn about a local named "index" clashing with the global function of the same name. We do seem to have an uncommonly large number of local declarations shadowing other locals though, e.g.: ../../src/gdb/osdata.c:331: error: declaration of =E2=80=98old_chain=E2=80= =99 shadows a previous local ../../src/gdb/osdata.c:286: error: shadowed declaration is here Tom