From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17773 invoked by alias); 13 Jul 2009 17:03:44 -0000 Received: (qmail 17765 invoked by uid 22791); 13 Jul 2009 17:03:43 -0000 X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mx2.redhat.com (HELO mx2.redhat.com) (66.187.237.31) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 13 Jul 2009 17:03:37 +0000 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n6DH3Z9E009342 for ; Mon, 13 Jul 2009 13:03:35 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n6DH3Yw0026478; Mon, 13 Jul 2009 13:03:34 -0400 Received: from toner.yyz.redhat.com (toner.yyz.redhat.com [10.15.16.55]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n6DH3XrO012658; Mon, 13 Jul 2009 13:03:33 -0400 Message-ID: <4A5B68A4.30006@redhat.com> Date: Mon, 13 Jul 2009 17:55:00 -0000 From: Sami Wagiaalla User-Agent: Thunderbird 2.0.0.17 (X11/20081009) MIME-Version: 1.0 To: Sami Wagiaalla , GDB Patches Subject: Re: [patch] Perform a namespace lookup at every block level References: <4A57512A.7090208@redhat.com> <20090710194949.GA2064@caradoc.them.org> In-Reply-To: <20090710194949.GA2064@caradoc.them.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2009-07/txt/msg00360.txt.bz2 > 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