c++/3032: Suggestion on Error and Warning Messages
peterson@austin.ibm.com
peterson@austin.ibm.com
Fri Jun 1 13:46:00 GMT 2001
>Number: 3032
>Category: c++
>Synopsis: Suggestion on Error and Warning Messages
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: unassigned
>State: open
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Fri Jun 01 13:46:01 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator: James Peterson
>Release: version 3.1
>Organization:
>Environment:
Running gcc from x86-64.org on Linux
>Description:
In porting a large amount of C++ code, I am generating
hundreds of error and warning messages. Because of the
way that these messages are formatted, it is not possible
to easily grep them out of the build log, and sort/uniq
them to get the most common errors/warnings.
There are two problems:
1. Someone has added code to do line wrapping of the
error messages. While this might be necessary for
non-emacs users, those of us with wide terminal lines
and using emacs on the errors have no need for line wrap.
At the least can this be a compiler output option, or
an option for the preferred line length (so we can set
the preferred line length to 1000000 and get the effect of
no-line-wrap). The code for line wrap is in gcc/diagnostic.c
I believe.
2. While warning lines are tagged as such, error lines are
not tagged. Given that gcc can put out many, many lines
of output for each error or warning (the trace of header
files that resulted in an error/warning, comments that
it will only list each undefined variable once, and so on)
it is often difficult to find an actual error message
in the output. It would be much easier if each error
message was tagged with "Error", just as warnings are
tagged with "warning". (Actually it would be best if
both Errors and Warnings were not just lower case, since
the purely lower case versions end up being parts of
file names and variable names -- mixed case is less likely
to be part of a file or variable name. I have hacked
my version of 3.0 gcc to say "*** Error" and "*** Warning",
so that I can grep for both make and gcc errors with the
same string "***".
Warning messages are tagged in several files:
gcc/errors.c, gcc/tradcpp.c, gcc/cpperror.c, and
gcc/diagnostic.c
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the Gcc-bugs
mailing list