This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug middle-end/26061] error and warning count



------- Comment #13 from manu at gcc dot gnu dot org  2007-07-03 09:03 -------
(In reply to comment #12)
> [Here's what I sent to gcc-patches as a review of this patch:]
> Doing this will certainly break many tools which parse the output of GCC,

In the same way that adding any other output message would break those tools if
those tools aren't prepared to deal with undefined output. We have a lot of
messages that don't follow any prefix: "warnings being treated as errors", 
"compilation terminated due to -Wfatal-errors", etc. They are special cases in
the testsuite. The message "gcc: *** 3 errors, 1 warning" cannot be confused
with any existing output and any tool that parses the output of GCC should
ignore messages that it cannot understand. In the worst case, the modification
for any existing parser to ignore that line would be trivial.

> especially in the case of a successful compilation which produced some
> warnings.  

I don't get how a parser can be *especially* confused in this case unless you
are parsing for the word "error" to determine the success of the compilation.
And that would be doubly stupid: 1) you should actually look for " error: " and
2) the return value of GCC already tells whether the compilation succeeded. 

> I'm hard-pressed to think of a reason why, if this is implemented, you would
> want to be able to switch it off, so I see no reason to have a flag (unless
> someone else thinks of a reason).

I cannot think of a reason either and if you strongly need to filter out that
from the output, the regexp would be trivial and it will only match that line.

Thanks for the review.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26061


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]