diff options
author | Bernhard Schommer <bernhardschommer@gmail.com> | 2016-08-29 14:54:06 +0200 |
---|---|---|
committer | Bernhard Schommer <bernhardschommer@gmail.com> | 2016-08-29 14:54:06 +0200 |
commit | 5cf814404cec9a8702e4bfa88e0f9176fa04ecfb (patch) | |
tree | fabd44046e3e5b9aaac7f33b9e4dddaa8d3f06e8 /cparser/Cerrors.ml | |
parent | 3208e22ea89c459a5a7944ad8e82511d4a5328fa (diff) | |
parent | 477f73ef96d957de5a896a05175ceaab7e0dce03 (diff) | |
download | compcert-5cf814404cec9a8702e4bfa88e0f9176fa04ecfb.tar.gz compcert-5cf814404cec9a8702e4bfa88e0f9176fa04ecfb.zip |
Merge branch 'master' into advanced-diagnostics
Diffstat (limited to 'cparser/Cerrors.ml')
-rw-r--r-- | cparser/Cerrors.ml | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/cparser/Cerrors.ml b/cparser/Cerrors.ml index 8ee13caf..046ca9b0 100644 --- a/cparser/Cerrors.ml +++ b/cparser/Cerrors.ml @@ -207,7 +207,7 @@ let rc fmt = cprintf fmt "\x1b[31;1m" let mc fmt = - cprintf fmt "\x1b35;1m" + cprintf fmt "\x1b[35;1m" let pp_key key fmt = let key = match key with @@ -240,7 +240,7 @@ let warning loc ty fmt = | WarningMsg -> incr num_warnings; kfprintf (pp_key key) - err_formatter ("%a %twarning:%tm: %t" ^^ fmt) pp_loc loc mc rsc bc + err_formatter ("%a %twarning:%t: %t" ^^ fmt) pp_loc loc mc rsc bc | SuppressedMsg -> ifprintf err_formatter fmt let error loc fmt = @@ -301,3 +301,7 @@ let warning_help = "Diagnostic options:\n\ \ -Wfatal-errors Turn all errors into fatal errors aborting the compilation\n\ \ -fdiagnostics-color Turn on colored diagnostics\n\ \ -fno-diagnostics-color Turn of colored diagnostics\n" + +let raise_on_errors () = + if !num_errors > 0 then + raise Abort |