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]

[PATCH/fortran] Add option to make 1st error fatal


The attached patch has been bootstrapped and regression
tested on i386-*-freebsd.

What does it do?  Consider the source in PR fortran/23538.
This code will cause gfortran to go into an infinite loop,
which isn't too unexpected in that that code is F66.  However,
to try to debug the codei and/or gfortran, one see 438 error
messages fly by the screen.  Many of these errors are simply
cascaded from an earlier error are somewhat bogus.  This 
patch disables the output of warnings and the first encountered
error is fatal.  For example, instead of 438 errors, I now get

kargl[213] gfc41 -c -ffatal pr23538.f 
 In file pr23538.f:308

   37 format(*0absolute addresses of first,nbaxo + nelpaz in elpa*3o21) 
             1
Error: Unexpected element in format string at (1)


OK for mainline?

2005-10-30  Steven G. Kargl  <kargls@comcast.net>

	*lang.opt: Define -ffatal
	*gfortran.h: Add gfc_option.flag_fatal.
	*options.c(gfc_init_options,gfc_post_options): Set and use it.
	*error.c (gfc_error_check): Use it.
	*invoke.texi: Document -ffatal.

-- 
Steve

Attachment: fatal.diff
Description: Text document


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