This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/23967] New: misleading error message for ambiguous namespace reference
- From: "jens dot maurer at gmx dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 19 Sep 2005 15:59:44 -0000
- Subject: [Bug c++/23967] New: misleading error message for ambiguous namespace reference
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The namespace reference in the code below is ambiguous. gcc 4.0.1 shows the
misleading error message
tst.cc: In function 'int main()':
tst.cc:16: error: 'N' has not been declared
tst.cc:16: error: 'f' was not declared in this scope
namespace N {
void f();
}
namespace A {
namespace N {
void f();
}
}
using namespace A;
int main()
{
N::f();
}
--
Summary: misleading error message for ambiguous namespace
reference
Product: gcc
Version: 4.0.1
Status: UNCONFIRMED
Severity: minor
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: jens dot maurer at gmx dot net
CC: Jens dot Maurer at is-teledata dot com,gcc-bugs at gcc
dot gnu dot org
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23967