[Bug c++/20234] incorrect error: class has not been declared
bangerth at dealii dot org
gcc-bugzilla@gcc.gnu.org
Mon Feb 28 22:01:00 GMT 2005
------- 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
More information about the Gcc-bugs
mailing list