This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/15179] Error message can be improved
- 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 Apr 2004 00:00:42 -0000
- Subject: [Bug c++/15179] Error message can be improved
- References: <20040427203034.15179.igodard@pacbell.net>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From bangerth at dealii dot org 2004-04-28 00:00 -------
Confirmed. For this code
-----------
template <class T> class O {
typedef O<T> Type;
typedef int inner;
class I
{
typedef Type::inner inner;
};
};
-----------
gcc produces
g/x> /home/bangerth/bin/gcc-3.5-pre/bin/c++ -c x.cc
x.cc:6: error: type `O<T>' is not derived from type `O<T>::I'
x.cc:6: error: ISO C++ forbids declaration of `inner' with no type
x.cc:6: error: expected `;' before "inner"
which is indeed confusing. (icc, for reference, simply accepts the code
even with -Xc -ansi -- which is probably wrong.)
Frankly, I have no clue what path in the compiler we are taking to get
to this error message...
W.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15179