On Fri, 2016-10-14 at 15:50 -0400, Nathan Sidwell wrote:
> On 10/14/16 15:17, David Malcolm wrote:
> 
> > "Limits the maximum number of error messages to @var{n}, at which
> > point
> > GCC bails out rather than attempting to continue processing the
> > source
> > code.  If @var{n} is 0 (the default), there is no limit on the
> > number
> > of error messages produced.  If @option{-Wfatal-errors} is also
> > specified, then @option{-Wfatal-errors} takes precedence over this
> > option."
> > 
> > I'm not sure that the above would still be true after this patch.
> 
> disagree.  The above documentation is still correct.

Yes - it's possible to interpret the docs in such a way that they're
still correct.

> > How about splitting out the bail-out code into a separate function:
> > 
> >    diagnostic_handle_max_errors
> > 
> > or somesuch, and calling it before emitting a diagnostic (like in
> > your
> > patch), and *also* at various key points in compilation - perhaps
> > at
> > some of the places where we call seen_error?  That way we wouldn't
> > need
> > an additional error to happen to stop processing, and notes would
> > still
> > happen after the final error.  There could also be one just before
> > we
> > cleanup the global_dc, so that the user gets the message there, if
> > they
> > haven't gotten it yet.
> 
> that would be possible, but seems over engineered to me. The patch I
> posted is 
> clearly an improvement in the user interface.

Your patch is a definite improvement to the UI.   I agree with your
characterization of my suggestion.

The patch is OK, assuming usual testing.

Thanks

Dave

Reply via email to