From: Tom Tromey <tromey@redhat.com>
To: Pedro Alves <pedro@codesourcery.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [ob] rename local variable in break_command_really.
Date: Thu, 11 Jun 2009 20:37:00 -0000 [thread overview]
Message-ID: <m33aa6cxva.fsf@fleche.redhat.com> (raw)
In-Reply-To: <200906111959.07108.pedro@codesourcery.com> (Pedro Alves's message of "Thu\, 11 Jun 2009 19\:59\:06 +0100")
>>>>> "Pedro" == Pedro Alves <pedro@codesourcery.com> writes:
Pedro> I was doing some local debug changes to break_command_really, that
Pedro> were introducing a usage of the ALL_BREAKPOINTS macro, and
Pedro> mysteriously, the result was failing to compile. Turns out this
Pedro> function declares a variable named breakpoint_chain, which is the
Pedro> same name of the global ALL_BREAKPOINTS references...
Pedro> I've checked this in to hopefully avoid such headaches to
Pedro> someone else (maybe me!) in the future.
Out of curiosity I tried a build with -Wshadow. That gives more than
500 errors. Unfortunately a lot of them (IMO) are somewhat bogus :(,
e.g., a warn about a local named "index" clashing with the global
function of the same name.
We do seem to have an uncommonly large number of local declarations
shadowing other locals though, e.g.:
../../src/gdb/osdata.c:331: error: declaration of ‘old_chain’ shadows a previous local
../../src/gdb/osdata.c:286: error: shadowed declaration is here
Tom
prev parent reply other threads:[~2009-06-11 20:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-11 18:57 Pedro Alves
2009-06-11 20:37 ` Tom Tromey [this message]
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=m33aa6cxva.fsf@fleche.redhat.com \
--to=tromey@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=pedro@codesourcery.com \
/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