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: Sami Wagiaalla <swagiaal at redhat dot com>
- To: Sami Wagiaalla <swagiaal at redhat dot com>, GDB Patches <gdb-patches at sourceware dot org>
- Date: Mon, 13 Jul 2009 13:02:28 -0400
- Subject: Re: [patch] Perform a namespace lookup at every block level
- References: <4A57512A.7090208@redhat.com> <20090710194949.GA2064@caradoc.them.org>
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:
Yes, it is searched too early.
imports such as:
using namespace A
should not be applied until the function level lookup fails.
However, imports of type:
using A::a
are applied at the block level and take priority over higher lexical
scope variables. So they will require per-block lookup, but that is
another patch for another feature.
I will correct this patch.
Sami