[patch] Perform a namespace lookup at every block level

Daniel Jacobowitz drow@false.org
Fri Jul 10 20:16:00 GMT 2009


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



More information about the Gdb-patches mailing list