This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: C++ Error message question and suggestion.
- To: kevinatk@home.com
- Subject: Re: C++ Error message question and suggestion.
- From: "Martin v. Loewis" <martin@mira.isdn.cs.tu-berlin.de>
- Date: Tue, 10 Aug 1999 21:58:44 +0200
- CC: gcc@gcc.gnu.org
- References: <37AFD2B7.15891BA0@home.com>
> What does "`const basic_rcon::pair *' is not a class, struct, or union
> type" as given by:
[...]
> suppose to mean?
Exactly that: const basic_rcon::pair * is a "pointer type", and
neither a struct, nor a class, nor a union. And - it should be, in the
place where you use it - which is a qualification in a template
instantiation, such as
template<class T>
struct S{
typename T::foo::bar x;
};
struct A{
typedef int foo;
};
S<A> X;
Here, template S assumes that T::foo is a class, struct, or union type
which has a nested type "bar" - however, T::foo is `int', hence the
error.
> Has any one considered an option to produce better formatted error
> messages.
Not to my knowledge, no. There have been numerous proposals for
improving the error messages, but none that deals with reformatting
them to be more readable. If you can find an algorithm that makes it
more readable, a patch to the compiler would be most welcome.
Regards,
Martin