aboutsummaryrefslogtreecommitdiff
path: root/gcc/diagnostic.h
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/diagnostic.h
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/diagnostic.h')
-rw-r--r--gcc/diagnostic.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/diagnostic.h b/gcc/diagnostic.h
index 99671c6..8074354 100644
--- a/gcc/diagnostic.h
+++ b/gcc/diagnostic.h
@@ -128,6 +128,9 @@ struct diagnostic_context
/* True if warnings should be given in system headers. */
bool dc_warn_system_headers;
+ /* Maximum number of errors to report. */
+ unsigned int max_errors;
+
/* This function is called before any message is printed out. It is
responsible for preparing message prefix and such. For example, it
might say: