public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c++/100
@ 2003-05-05 23:56 Wolfgang Bangerth
  0 siblings, 0 replies; only message in thread
From: Wolfgang Bangerth @ 2003-05-05 23:56 UTC (permalink / raw)
  To: nathan; +Cc: gcc-prs

The following reply was made to PR c++/100; it has been noted by GNATS.

From: Wolfgang Bangerth <bangerth@ices.utexas.edu>
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/
 
 


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-05-05 23:56 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-05-05 23:56 c++/100 Wolfgang Bangerth

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).