This is the mail archive of the
mailing list for the GDB project.
Re: [PATCH 036/238] [index] i386-tdep.c: -Wshadow fix
> Date: Tue, 13 Dec 2011 03:17:10 -0500
> From: Eli Zaretskii <email@example.com>
> > Date: Tue, 13 Dec 2011 08:17:38 +0100 (CET)
> > From: Mark Kettenis <firstname.lastname@example.org>
> > CC: email@example.com, firstname.lastname@example.org
> > > From: Andrey Smirnov <email@example.com>
> > > Date: Mon, 12 Dec 2011 19:38:39 -0800
> > >
> > > To ChangeLog:
> > > * i386-tdep.c (i386_record_lea_modrm_addr): Rename `index' to
> > > `idx'(-Wshadow).
> > > ---
> > > gdb/i386-tdep.c | 8 ++++----
> > > 1 files changed, 4 insertions(+), 4 deletions(-)
> > My position on this is unchanged. I think 'index' is a perfectly good
> > variable name
> And `idx' is its extremely popular synonym.
> How much of personal preferences should area maintainers force on
> contributors, just because they can?
I don't think we have concensus on -Wshadow. One of the compromises
that has been talked about is to only enable -Wshadow with new
versions on GCC that don't issue warnings for shadowing symbols in
system headers. That would make the changes in this class unnecessary
and therefore I think they should not be applied.