From 3f139fcf2aa9cec8de6a5d03c867148dc8b049c9 Mon Sep 17 00:00:00 2001 From: Brooks Moses Date: Thu, 9 Nov 2006 06:53:05 +0000 Subject: lang.opt: Add -fmax-errors= option. * lang.opt: Add -fmax-errors= option. * gfortran.h (gfc_option_t): Add max_errors element. * options.c (gfc_init_options): Set max_errors default value to 25. (gfc_handle_options): Assign -fmax_errors value to gfc_option.max_errors. * error.c (gfc_increment_error_count): New function, which also checks whether the error count exceeds max_errors. (gfc_warning): Use it. (gfc_warning_now): Use it. (gfc_notify_std): Use it. (gfc_error): Use it. (gfc_error_now): Use it. (gfc_error_check): Use it. From-SVN: r118615 --- gcc/fortran/options.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'gcc/fortran/options.c') diff --git a/gcc/fortran/options.c b/gcc/fortran/options.c index d5920e4..ef44ae5 100644 --- a/gcc/fortran/options.c +++ b/gcc/fortran/options.c @@ -61,6 +61,7 @@ gfc_init_options (unsigned int argc ATTRIBUTE_UNUSED, gfc_option.warn_surprising = 0; gfc_option.warn_tabs = 1; gfc_option.warn_underflow = 1; + gfc_option.max_errors = 25; gfc_option.flag_all_intrinsics = 0; gfc_option.flag_default_double = 0; @@ -512,6 +513,10 @@ gfc_handle_option (size_t scode, const char *arg, int value) gfc_option.flag_implicit_none = value; break; + case OPT_fmax_errors_: + gfc_option.max_errors = value; + break; + case OPT_fmax_stack_var_size_: gfc_option.flag_max_stack_var_size = value; break; -- cgit v1.1