From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32599 invoked by alias); 5 May 2003 23:56:01 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 32580 invoked by uid 71); 5 May 2003 23:56:01 -0000 Date: Mon, 05 May 2003 23:56:00 -0000 Message-ID: <20030505235601.32579.qmail@sources.redhat.com> To: nathan@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, From: Wolfgang Bangerth Subject: Re: c++/100 Reply-To: Wolfgang Bangerth X-SW-Source: 2003-05/txt/msg00320.txt.bz2 List-Id: The following reply was made to PR c++/100; it has been noted by GNATS. From: Wolfgang Bangerth To: gcc-gnats@gcc.gnu.org Cc: Subject: Re: c++/100 Date: Mon, 5 May 2003 18:50:26 -0500 (CDT) For reference again: ---------------------------- class X {}; namespace NS { typedef X X; } using namespace NS; void foo () { X x; } --------------------------- Per 7.3.4.2, name lookup for X is ambiguous since the namespace into which the using directive "injects" NS::X is the global one, which is the same in which class X is declared. That NS::X is a typedef pointing to ::X is irrelevant in my opinion. What _is_ relevant, though, is that the error message we presently get is really not helpful: g/x> /home/bangerth/bin/gcc-3.4-pre/bin/gcc -W -Wall -c x.cc x.cc: In function `void foo()': x.cc:10: error: `X' does not name a type W. ------------------------------------------------------------------------- Wolfgang Bangerth email: bangerth@ices.utexas.edu www: http://www.ices.utexas.edu/~bangerth/