summaryrefslogtreecommitdiff
path: root/gcc/diagnostic.h
diff options
context:
space:
mode:
authorfroydnj <froydnj@138bc75d-0d04-0410-961f-82ee72b054a4>2010-11-12 03:38:15 +0000
committerfroydnj <froydnj@138bc75d-0d04-0410-961f-82ee72b054a4>2010-11-12 03:38:15 +0000
commit566d7c74da1398124a7c4af3c284b8b4d992b9c0 (patch)
treec56e28b52155f9b2ee4a677a9f4053bfc8c50f83 /gcc/diagnostic.h
parente6b16ad2949ab00bc64475d6785f2b0d6c63e440 (diff)
downloadgcc-566d7c74da1398124a7c4af3c284b8b4d992b9c0.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@166644 138bc75d-0d04-0410-961f-82ee72b054a4
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 99671c64e59..80743549a35 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: