This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/20234] incorrect error: class has not been declared
- From: "bangerth at dealii dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 28 Feb 2005 15:47:23 -0000
- Subject: [Bug c++/20234] incorrect error: class has not been declared
- References: <20050227154448.20234.fang@csl.cornell.edu>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From bangerth at dealii dot org 2005-02-28 15:47 -------
Kriang is our resident expert on this. A shorter testcase is this:
-------------------
class C;
namespace NS {
class A {
friend class C;
};
}
using namespace NS;
class C {};
C c;
----------------------------
g/x> /home/bangerth/bin/gcc-3.4*/bin/c++ -c x.cc
g/x> /home/bangerth/bin/gcc-4.0-pre/bin/c++ -c x.cc
x.cc:11: error: ?C? does not name a type
g/x> icc -Xc -ansi -c x.cc
The error is really that gcc thinks that the class is ambiguous -- the
fact that it says something completely different is a second symptom of
really bad error messages, but this case is covered in another PR. The
question here is: is the use of the name 'C' ambiguous or is it not.
W.
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |lerdsuwa at gcc dot gnu dot
| |org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20234