[PATCH 35/358] Fix -Wsahdow warnings
Andrey Smirnov
andrew.smirnov@gmail.com
Wed Nov 23 04:46:00 GMT 2011
On Wed, Nov 23, 2011 at 7:35 AM, Stan Shebs <stanshebs@earthlink.net> wrote:
> On 11/22/11 5:25 AM, Andrey Smirnov wrote:
> [...]
>
> - struct symtab_and_line sal;
> + struct symtab_and_line las;
>
>
> While clever and amusing, this is probably a bad idea for the long run;
> without any comment explaining it, some future hacker is really really going
> to want to change it back to "sal", and when enough time has passed, no one
> will remember why they should object.
There are 358 patches and I assure you being clever and amusing did
not come to my mid while I was renaming all conflicting variables. As
to your objection: I thought the goal of the whole patchset is to add
-Wshadow to default compiler flags, is it not? I case it is, than the
future hacker will get a slap from compiler, for shadowing the previous
definition of `sal'. And in case it isn't I have a very loud "Why?!"
to shout at the universe.
> Better to use something dull and predictable like "sal2".
Given the choice between `las' and `sal2' I have no preference either
way, so I'll rename it.
Andrey Smirnov
More information about the Gdb-patches
mailing list