[Bug c++/21181] New: namespace lookup error message misleading
tneumann at pi3 dot informatik dot uni-mannheim dot de
gcc-bugzilla@gcc.gnu.org
Sat Apr 23 20:27:00 GMT 2005
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
More information about the Gcc-bugs
mailing list