This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: Refactor tdep-i386.c to fix all -Wshadow warnings
>>>>> "Goncalo" == Goncalo Gomes <goncalo@promisc.org> writes:
Goncalo> The attached patch fixes all warnings in tdep-i386.c resulting from
Goncalo> enabling shadow warnings in gcc. As this is my first contribution to
Goncalo> GDB, I decided to keep it short to a single file to obtain feedback.
Just a friendly word of warning -- this is arguably the worst project to
pick of all the things on the project page (though unfortunately there
is more than one stinker on there). It's been attempted a couple of
times, had always lead to a lot of contention, etc.
That doesn't mean it can't be done, just that you ought to expect it to
be a pain.
Last time this came up, I think the conclusion was that we'd prefer it
if we could get warnings only for some kinds of shadowing, but not all
kinds. There was a sense that warnings for shadowing of 'index' was not
very useful. I remember some discussion of checking for a GCC change in
gdb's configure, but I don't remember the details any more. They're in
the archives.
Tom