From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30018 invoked by alias); 5 Dec 2011 12:59:22 -0000 Received: (qmail 30009 invoked by uid 22791); 5 Dec 2011 12:59:21 -0000 X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from mail-iy0-f169.google.com (HELO mail-iy0-f169.google.com) (209.85.210.169) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 05 Dec 2011 12:59:08 +0000 Received: by iapp10 with SMTP id p10so6615493iap.0 for ; Mon, 05 Dec 2011 04:59:08 -0800 (PST) MIME-Version: 1.0 Received: by 10.231.21.234 with SMTP id k42mr696974ibb.46.1323089948098; Mon, 05 Dec 2011 04:59:08 -0800 (PST) Received: by 10.50.237.74 with HTTP; Mon, 5 Dec 2011 04:59:08 -0800 (PST) In-Reply-To: <20111205112523.GJ2777@adacore.com> References: <1322493153-29512-1-git-send-email-andrew.smirnov@gmail.com> <20111205112523.GJ2777@adacore.com> Date: Mon, 05 Dec 2011 13:05:00 -0000 Message-ID: Subject: Re: [PATCH 033/238] [misc.] breakpoint.c: -Wshadow fix From: Andrey Smirnov To: Joel Brobecker Cc: Pedro Alves , Jan Kratochvil , gdb-patches@sourceware.org, tromey@redhat.com Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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: 2011-12/txt/msg00132.txt.bz2 > I looked at it, and it looks fine from a functional point of view. > However, I'd rather have Jan or Pedro, who have modified this function > more often than I have, to weigh in. > > Personally, I'm not keen on the fact that a global variable is reused > in the context of a local loop. So I would rather rename the local > variable inside the loop rather than delete the local variable, > and reuse the global one. =A0It makes for a bigger patch, but I think > it's better in the end. I tried to used the strategy you describe in all my patches and initial patch actually renamed the local variable, this modification was made because of Tom's recommendation, see http://sourceware.org/ml/gdb-patches/2011-11/msg00601.html So, I guess we will have to get to some sort of consensus on how to deal with that name clash. Andrey Smirnov