This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch] Perform a namespace lookup at every block level
- From: Daniel Jacobowitz <drow at false dot org>
- To: Sami Wagiaalla <swagiaal at redhat dot com>
- Cc: GDB Patches <gdb-patches at sourceware dot org>
- Date: Fri, 10 Jul 2009 15:49:49 -0400
- Subject: Re: [patch] Perform a namespace lookup at every block level
- References: <4A57512A.7090208@redhat.com>
On Fri, Jul 10, 2009 at 10:33:14AM -0400, Sami Wagiaalla wrote:
> Now that import information is stored in the nearest block,
> this patch changes things so that a namespace lookup is correctly
> performed at every block level.
Where in the overall search order are block-level using directives
supposed to fall according to the standard? And where does this patch
put them?
It looks to me like this change causes the global scope to be searched
too early (and too often). Given this:
int a;
int foo()
{
int a;
if (...)
{
breakpoint_here;
}
}
If we do a namespace scope search for a in the inner block, we'll find
the copy in this file instead of the enclosing local.
--
Daniel Jacobowitz
CodeSourcery