This is the mail archive of the
mailing list for the GDB project.
Re: [PATCH 033/238] [misc.] breakpoint.c: -Wshadow fix
- From: Andrey Smirnov <andrew dot smirnov at gmail dot com>
- To: Joel Brobecker <brobecker at adacore dot com>
- Cc: Pedro Alves <pedro at codesourcery dot com>, Jan Kratochvil <jan dot kratochvil at redhat dot com>, gdb-patches at sourceware dot org, tromey at redhat dot com
- Date: Mon, 5 Dec 2011 18:59:08 +0600
- Subject: Re: [PATCH 033/238] [misc.] breakpoint.c: -Wshadow fix
- References: <firstname.lastname@example.org> <email@example.com> <20111205112523.GJ2777@adacore.com>
> 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. ?It 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
So, I guess we will have to get to some sort of consensus on how to deal
with that name clash.