Currently, namespace_decls have no record of how deep they reside in the namespace tree. That makes is_ancestor overly complex (and therefore bleeds over into unqualified namespace lookup) This patch adds a SCOPE_DEPTH macro (it may be useful to extend to other scope-like things). It uses the base.u.bits.address_space field, which is available to us. We 'only' permit 255 levels of namespace. nathan -- Nathan Sidwell