aboutsummaryrefslogtreecommitdiffstats
path: root/cparser/Cerrors.ml
diff options
context:
space:
mode:
authorMichael Schmidt <github@mschmidt.me>2016-08-17 16:32:56 +0200
committerMichael Schmidt <github@mschmidt.me>2016-08-17 16:32:56 +0200
commite0f0f573a4a8fc1f564a31388afa9c23e48bb016 (patch)
treeb7c004b3aae01c79bef8c8914e759a1e3ce358f7 /cparser/Cerrors.ml
parent18fcf2ffef8b4ba5eb0624b15371e93b4ac88cfe (diff)
parente2b4459ccd1b0f8436cb70a631772d715e642dcd (diff)
downloadcompcert-e0f0f573a4a8fc1f564a31388afa9c23e48bb016.tar.gz
compcert-e0f0f573a4a8fc1f564a31388afa9c23e48bb016.zip
fix merge conflicts
Diffstat (limited to 'cparser/Cerrors.ml')
-rw-r--r--cparser/Cerrors.ml6
1 files changed, 4 insertions, 2 deletions
diff --git a/cparser/Cerrors.ml b/cparser/Cerrors.ml
index 5c077f37..a4d1a3f8 100644
--- a/cparser/Cerrors.ml
+++ b/cparser/Cerrors.ml
@@ -30,7 +30,7 @@ exception Abort
to print its message, as opposed to [Format], and does not automatically
introduce indentation and a final dot into the message. This is useful
for multi-line messages. *)
-
+
let fatal_error_raw fmt =
incr num_errors;
Printf.kfprintf
@@ -67,4 +67,6 @@ let check_errors () =
(if !num_warnings = 1 then "" else "s");
!num_errors > 0 || (!warn_error && !num_warnings > 0)
-
+let raise_on_errors () =
+ if !num_errors > 0 || (!warn_error && !num_warnings > 0) then
+ raise Abort