Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Andrey Smirnov <andrew.smirnov@gmail.com>
To: Stan Shebs <stanshebs@earthlink.net>
Cc: gdb-patches <gdb-patches@sourceware.org>
Subject: Re: [PATCH 35/358] Fix -Wsahdow warnings
Date: Wed, 23 Nov 2011 04:46:00 -0000	[thread overview]
Message-ID: <CAHQ1cqG93groSw_mYs-DGRtdN3LNtRaGvGigNDaLprHdj3CZVg@mail.gmail.com> (raw)
In-Reply-To: <4ECC3FD2.1000309@earthlink.net>

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


  reply	other threads:[~2011-11-23  4:46 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-22 13:25 Andrey Smirnov
2011-11-22 19:19 ` Tom Tromey
2011-11-23  0:35 ` Stan Shebs
2011-11-23  4:46   ` Andrey Smirnov [this message]
2011-11-28 15:19   ` [PATCH 034/238] [misc.] Fix -Wshadow warnings Andrey Smirnov
2011-12-05 11:30     ` Joel Brobecker
2011-12-05 13:27       ` Andrey Smirnov
2011-12-05 13:31         ` Joel Brobecker
2011-12-06 18:25           ` Pedro Alves

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAHQ1cqG93groSw_mYs-DGRtdN3LNtRaGvGigNDaLprHdj3CZVg@mail.gmail.com \
    --to=andrew.smirnov@gmail.com \
    --cc=gdb-patches@sourceware.org \
    --cc=stanshebs@earthlink.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox