This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 033/238] [misc.] breakpoint.c: -Wshadow fix


> 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
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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]