This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] fix PR 44782, implement -fmax-errors as a common option
On Nov 9, 2010, at 8:44 AM, Nathan Froyd wrote:
> On Tue, Nov 09, 2010 at 03:28:09PM +0000, Joseph S. Myers wrote:
>> On Tue, 9 Nov 2010, Nathan Froyd wrote:
>>> The patch below implements -fmax-errors for the C family of languages,
>>> as requested by PR 44782. I chose -fmax-errors rather than
>>> -ferror-limit for compatibility with the Fortran front end's option. I
>>> suppose if people wanted, we could add -ferror-limit as an undocumented
>>> Needs C approval for the c-family changes and a diagnostic maintainer's
>>> approval for diagnostic.* changes.
>> I don't think this should be a C-family option; just like -fshow-column,
>> for example, it should be a generic option in common.opt. If some
>> languages' diagnostics aren't affected by it because they don't go through
>> the common machinery, that is a problem with those languages (and maybe a
>> consequence of missing features in the generic diagnostic code that need
>> implementing before those languages can switch to it).
> Hm, OK. The patch below implements -fmax-errors as a common option,
> with some Fortran tweaks to make it work as expected. I am unsure what
> to do about the existing Fortran -fmax-errors documentation; I opted to
> leave it in for now, as options like -fsyntax-only and -pedantic are
> documented in both generic GCC and Fortran documentation.
> Tested on x86_64-unknown-linux-gnu with -fmax-errors testcases for
> C/C++/Fortran. OK to commit? (Not aimed at Joseph, as he is not
> responsible for the areas these changes touch.)
It would be nice to support -ferror-limit as an alias at least. People are much more likely to want to write makefiles that work with both clang and gcc than with gcc and gfortran.