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] Perform a namespace lookup at every block level


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


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