aboutsummaryrefslogtreecommitdiff
path: root/gcc/diagnostic.h
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@acm.org>2016-12-05 12:24:39 +0000
committerNathan Sidwell <nathan@gcc.gnu.org>2016-12-05 12:24:39 +0000
commitd0ea9f0aa270f9791df42eb409e90c718575ad9a (patch)
tree63b942309e0e3faf9b2b19ff2be30494a2a4bbf1 /gcc/diagnostic.h
parentfb5e7daea59060603a2e526cab4e35b32a8e9438 (diff)
downloadgcc-d0ea9f0aa270f9791df42eb409e90c718575ad9a.zip
gcc-d0ea9f0aa270f9791df42eb409e90c718575ad9a.tar.gz
gcc-d0ea9f0aa270f9791df42eb409e90c718575ad9a.tar.bz2
diagnostic.c (diagnostic_check_max_errors): New, broken out of ...
gcc/ * diagnostic.c (diagnostic_check_max_errors): New, broken out of ... (diagnostic_action_after_output): ... here. (diagnostic_report_diagnostic): Call it for non-notes. * diagnostic.h (struct diagnostic_context): Make max_errors signed int. (diagnostic_check_max_errors): Declare. gcc/fortran/ * error.c (gfc_warning_check): Call diagnostic_check_max_errors. (gfc_error_check): Likewise. gcc/testsuite/ * c-c++-common/fmax_errors.c: Check notes after last error are emitted. From-SVN: r243254
Diffstat (limited to 'gcc/diagnostic.h')
-rw-r--r--gcc/diagnostic.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/diagnostic.h b/gcc/diagnostic.h
index ead4d2a..f3bb494 100644
--- a/gcc/diagnostic.h
+++ b/gcc/diagnostic.h
@@ -143,7 +143,7 @@ struct diagnostic_context
bool dc_warn_system_headers;
/* Maximum number of errors to report. */
- unsigned int max_errors;
+ 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
@@ -320,6 +320,7 @@ void default_diagnostic_start_span_fn (diagnostic_context *,
void default_diagnostic_finalizer (diagnostic_context *, diagnostic_info *);
void diagnostic_set_caret_max_width (diagnostic_context *context, int value);
void diagnostic_action_after_output (diagnostic_context *, diagnostic_t);
+void diagnostic_check_max_errors (diagnostic_context *, bool flush = false);
void diagnostic_file_cache_fini (void);