Arthur Schwarz <aschwarz1...@verizon.net> writes:

> 1: Any thought to including column numbers with line numbers on 
>    ERROR messages? Looking at a diagnostic message for a complex
>    statement  without a column number has lead to making an 
>    incorrect assumption as to what in the line is faulty. A 
>    column number would help to identify the fault.

This can already be done using -fshow-column.  However, the column
numbers in released versions of gcc are not very accurate.  There is
work under way to improve that:
http://gcc.gnu.org/wiki/Better_Diagnostics


> 2: Stream errors are tortuous to decode to find the cause of  
>    error..Any thought to simplification? 
>
>    In particular: 'stream << something_wrong;' can produce a 
>    multiline message with copious use of the templates used - 
>    but no simple statement as what the error is.
>
> 3: A simple error:
>    'ifstream istream;'
>    Leads to an diagnostic message which seems remote from
>    the problem.
>
> Most diagnostic messages contain some indication of what the failure 
> is and what to do to repair them. Some messages are outstanding. 
> But then again, some could probably use a little tweaking. Any thoughts?

I completely agree that the C++ diagnostics need to be improved.  gcc
mainline recently took a step forward with simplification of template
error messages.  However, much more can be done.

One problem we face is that compiler developers tend to be too close to
the problem.  It helps for users to give examples and to give specific
suggestions for how the diagnostics could be improved.

Another problem is that among users there is significant disagreement
over how warnings can be most useful.  Controlling the warning output by
options can help, but most users do not read the manual and will not be
aware of the options.  So choosing the best default behaviour is both
important and difficult, as reasonable people disagree.

Fortunately gcc is free software, and that means that you can help.
Even if you don't know how to change the code, if you can build a
consensus for what the best warning output should be, that would be an
enormous help in guiding how the warnings should be changed.

Thanks for your note.

Ian

Reply via email to