This is the mail archive of the gcc-patches@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]

Re: fix -fmax-errors & notes


On 10/11/16 16:07, David Malcolm wrote:

This logic is running when the next diagnostic is about to be emitted.
But what if the user has selected -Wfatal-errors and there's a single
error and no further diagnostics?  Could this change the observable
behavior?  (I'm trying to think of a case here, but failing).

good question.

I think both -Wfatal-errors and -fmax-errors=1 would now result in not emitting the 'compilation terminated' message (and similarly for any -fmax-errors=N with exactly N errors. Perhaps this is worth worrying about for -Wfatal-errors, but not for -fmax-errors. If one wanted notes but only one error one could use -fmax-errors=1. (not sure of the use case of -Wfatal-errors given -fmax-errors=1 seems to be nearly the same?)

Perhaps the -Wfatal-errors logic should remain unchanged?

nathan


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