From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1430 invoked by alias); 23 Apr 2005 20:27:17 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 1420 invoked by uid 48); 23 Apr 2005 20:27:14 -0000 Date: Sat, 23 Apr 2005 20:27:00 -0000 From: "tneumann at pi3 dot informatik dot uni-mannheim dot de" To: gcc-bugs@gcc.gnu.org Message-ID: <20050423202713.21181.tneumann@pi3.informatik.uni-mannheim.de> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug c++/21181] New: namespace lookup error message misleading X-Bugzilla-Reason: CC X-SW-Source: 2005-04/txt/msg03332.txt.bz2 List-Id: Consider the following C++ code: class A; namespace X { class B { friend class A; }; } using namespace X; class A {}; A a; In the last line the compiler complains that A is undefined. After reading the release notes I understamd what happens (although I'm surprised. E.g. Comeau accepts the code). However the error message is very misleading: The problem is not that A is undefined but that X::A is undefined! This is very confusing for users. -- Summary: namespace lookup error message misleading Product: gcc Version: 4.0.0 Status: UNCONFIRMED Severity: enhancement Priority: P2 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: tneumann at pi3 dot informatik dot uni-mannheim dot de CC: gcc-bugs at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21181