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