diff options
author | Nathan Froyd <froydnj@codesourcery.com> | 2010-11-12 03:38:15 +0000 |
---|---|---|
committer | Nathan Froyd <froydnj@gcc.gnu.org> | 2010-11-12 03:38:15 +0000 |
commit | 3a789837f5cc67590765e2a2a7c4afed7730d405 (patch) | |
tree | c56e28b52155f9b2ee4a677a9f4053bfc8c50f83 /gcc/fortran | |
parent | f03d897af30c62fe6e8e53c582cebefb1c35cd25 (diff) | |
download | gcc-3a789837f5cc67590765e2a2a7c4afed7730d405.zip gcc-3a789837f5cc67590765e2a2a7c4afed7730d405.tar.gz gcc-3a789837f5cc67590765e2a2a7c4afed7730d405.tar.bz2 |
re PR c/44782 (implement -ferror-limit=)
gcc/
PR c/44782
* common.opt (fmax-errors=): New option.
* opts.c (common_handle_option) [OPT_fmax_errors_]: Handle it.
* diagnostic.h (struct diagnostic_context): Add max_errors field.
* diagnostic.c (diagnostic_initialize): Initialize it.
(diagnostic_action_after_output): Exit if more than max_errors
have been output.
* doc/invoke.texi (Warning Options): Add -fmax-errors.
(-fmax-errors): Document.
gcc/fortran/
PR c/44782
* options.c (gfc_post_options): Initialize gfc_option.max_errors.
(gfc_handle_option) [OPT_fmax_errors_]: Remove.
* lang.opt (fmax-errors=): Remove.
gcc/testsuite/
PR c/44782
* c-c++-common/fmax-errors.c: New test.
From-SVN: r166644
Diffstat (limited to 'gcc/fortran')
-rw-r--r-- | gcc/fortran/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/fortran/lang.opt | 4 | ||||
-rw-r--r-- | gcc/fortran/options.c | 8 |
3 files changed, 11 insertions, 8 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 41a5bef..55e5058 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,10 @@ +2010-11-11 Nathan Froyd <froydnj@codesourcery.com> + + PR c/44782 + * options.c (gfc_post_options): Initialize gfc_option.max_errors. + (gfc_handle_option) [OPT_fmax_errors_]: Remove. + * lang.opt (fmax-errors=): Remove. + 2010-11-11 Steven G. Kargl <kargl@gcc.gnu.org> * symbol.c (verify_bind_c_derived_type): Accept BIND(C) on an empty diff --git a/gcc/fortran/lang.opt b/gcc/fortran/lang.opt index 6088730..371b71d 100644 --- a/gcc/fortran/lang.opt +++ b/gcc/fortran/lang.opt @@ -438,10 +438,6 @@ fmax-array-constructor= Fortran RejectNegative Joined UInteger -fmax-array-constructor=<n> Maximum number of objects in an array constructor -fmax-errors= -Fortran RejectNegative Joined UInteger --fmax-errors=<n> Maximum number of errors to report - fmax-identifier-length= Fortran RejectNegative Joined UInteger -fmax-identifier-length=<n> Maximum identifier length diff --git a/gcc/fortran/options.c b/gcc/fortran/options.c index ee17037..dd54a7d 100644 --- a/gcc/fortran/options.c +++ b/gcc/fortran/options.c @@ -273,6 +273,10 @@ gfc_post_options (const char **pfilename) if (flag_compare_debug) gfc_option.dump_fortran_original = 0; + /* Make -fmax-errors visible to gfortran's diagnostic machinery. */ + if (global_options_set.x_flag_max_errors) + gfc_option.max_errors = flag_max_errors; + /* Verify the input file name. */ if (!filename || strcmp (filename, "-") == 0) { @@ -760,10 +764,6 @@ gfc_handle_option (size_t scode, const char *arg, int value, gfc_option.flag_max_array_constructor = value > 65535 ? value : 65535; 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; |