Improving C++ error messages
Kevin Atkinson
kevinatk@home.com
Tue Aug 31 23:20:00 GMT 1999
"Martin v. Loewis" wrote:
> > I would like to see a solution where the compile tracks keep tracks of
> > the typedef currently in uses that name instead of the fully expanded
> > one. I am not saying it would be easy but it would go a LONG way in
> > producing much for readable messages.
>
> g++ already uses the typedefs to shorten names of template
> instantiations. I don't know why it does not work in your
> case. Perhaps the typedef names where not used in the instantiations?
Could you pleace elaborate here....
> > Also why does gcc only give the line number when giving an error
> > message. A character offset in many cases would be very useful as
> > often something like before '(' is not very useful when there is a
> > parse or syntax error as I have many '(' on one line.
>
> The problem is that the error messages are produced by cc1plus, after
> the preprocessor has already converted the input. Character positions
> are not meaningful, then, since macro expansions might have taken
> place. This could improve with cpplib integration.
Ok, I understand. How about providing a little more than just "before
`one keyword'"....
--
Kevin Atkinson
kevinatk@home.com
http://metalab.unc.edu/kevina/
More information about the Gcc
mailing list