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 35/358] Fix -Wsahdow warnings


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


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