[patch, fortran] Add -fmax-errors option to limit the number of errors emitted.

Brooks Moses brooks.moses@codesourcery.com
Thu Nov 9 08:35:00 GMT 2006


Steve Kargl wrote:
> On Wed, Nov 08, 2006 at 01:23:57PM -0800, Brooks Moses wrote:
>>Bernhard Fischer wrote:
>>>On Tue, Nov 07, 2006 at 01:29:29PM -0800, Brooks Moses wrote:
>>>>+    case OPT_fmax_errors_:
>>>
>>>->+      if (value < 0)
>>>
>>>Due to RejectNegative this can never happen.
>>
>>Right, yes.  I'll remove that redundant check from the final version of 
>>the patch.
> 
> With the change suggested by Bernhard, this is OK.

Changed, and submitted (as attached).

For the record, though, this isn't due to RejectNegative, which is 
related to whether there's a "no-" version of the option.  The reason 
this can never happen is that the UInteger option flag means to only 
allow unsigned integers.

> I'm almost tempted to suggest reducing the default error count
> from 50 to 25.  Once gfortran gets confused, bogus errors just
> spew forth.

Makes sense to me; 50 was just something I chose pretty arbitrarily, so 
I changed it to 25 instead.

- Brooks
-------------- next part --------------
A non-text attachment was scrubbed...
Name: max-errors.diff
Type: text/x-patch
Size: 4046 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20061109/d35b922c/attachment.bin>


More information about the Fortran mailing list