C++ Error message question and suggestion.

Kevin Atkinson kevinatk@home.com
Tue Aug 31 23:20:00 GMT 1999


"Martin v. Loewis" wrote:
> 
> > 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


I figured out what it meant eventually.  The message should really be
more descriptive such as.

the type "const basic_rcon::pair *" is a pointer and pointers do not
have member functions.   

or

the type "const basic_rcon::pair *" is a pointer and pointers do not
have nested classed or typedefs.

depednig on what the user is attempting to do.

> > 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.

I might work on that if I have the time.
-- 
Kevin Atkinson
kevinatk@home.com
http://metalab.unc.edu/kevina/



More information about the Gcc mailing list