From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2051 invoked by alias); 10 Jul 2009 19:50:02 -0000 Received: (qmail 2024 invoked by uid 22791); 10 Jul 2009 19:50:01 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 10 Jul 2009 19:49:53 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id E90AF108A1; Fri, 10 Jul 2009 19:49:50 +0000 (GMT) Received: from caradoc.them.org (209.195.188.212.nauticom.net [209.195.188.212]) by nan.false.org (Postfix) with ESMTP id CE12D10557; Fri, 10 Jul 2009 19:49:50 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.69) (envelope-from ) id 1MPM6P-0000ef-PV; Fri, 10 Jul 2009 15:49:49 -0400 Date: Fri, 10 Jul 2009 20:16:00 -0000 From: Daniel Jacobowitz To: Sami Wagiaalla Cc: GDB Patches Subject: Re: [patch] Perform a namespace lookup at every block level Message-ID: <20090710194949.GA2064@caradoc.them.org> Mail-Followup-To: Sami Wagiaalla , GDB Patches References: <4A57512A.7090208@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4A57512A.7090208@redhat.com> User-Agent: Mutt/1.5.20 (2009-06-14) 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/msg00315.txt.bz2 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