------- Additional Comments From reichelt at gcc dot gnu dot org 2004-12-17
19:44 -------
Indeed, this can be demonstrated with the following testcase:
===============================
struct A;
namespace N
{
struct A;
}
using namespace N;
int A::i;
int A::i;
namespace N
{
struct C;
struct C {};
}
class D : N::C {};
===============================
With mainline I get the bogus error message:
PR19030.cc:10: error: 'A' has not been declared
PR19030.cc:11: error: 'A' has not been declared
PR19030.cc:11: error: redefinition of 'int i'
PR19030.cc:10: error: 'int i' previously declared here
PR19030.cc:16: error: conflicting declaration 'struct N::C'
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
PR19030.cc:15: error: 'struct N::C' has a previous declaration as 'struct N::C'
PR19030.cc:16: internal compiler error: tree check: expected class
'declaration', have 'exceptional' (error_mark) in pushtag, at
cp/name-lookup.c:4672
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19030