aboutsummaryrefslogtreecommitdiff
path: root/gcc/opts.c
diff options
context:
space:
mode:
authorNathan Froyd <froydnj@codesourcery.com>2010-11-12 03:38:15 +0000
committerNathan Froyd <froydnj@gcc.gnu.org>2010-11-12 03:38:15 +0000
commit3a789837f5cc67590765e2a2a7c4afed7730d405 (patch)
treec56e28b52155f9b2ee4a677a9f4053bfc8c50f83 /gcc/opts.c
parentf03d897af30c62fe6e8e53c582cebefb1c35cd25 (diff)
downloadgcc-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/opts.c')
-rw-r--r--gcc/opts.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/opts.c b/gcc/opts.c
index f5f60b5..f42ac53 100644
--- a/gcc/opts.c
+++ b/gcc/opts.c
@@ -2155,6 +2155,10 @@ common_handle_option (struct gcc_options *opts,
dc->dc_inhibit_warnings = true;
break;
+ case OPT_fmax_errors_:
+ dc->max_errors = value;
+ break;
+
case OPT_fuse_linker_plugin:
/* No-op. Used by the driver and passed to us because it starts with f.*/
break;