From f02f00a01b598567f70e138c144d9581973802e6 Mon Sep 17 00:00:00 2001 From: Bernhard Schommer Date: Thu, 8 Feb 2018 16:38:54 +0100 Subject: Refactor the handling of errors and warnings (#44) * Module Cerrors is now called Diagnostic and can be used in parts of CompCert other than cparser/ * Replaced eprintf error. Instead of having eprintf msg; exit 2 use the functions from the Diagnostics module. * Raise on error before calling external tools. * Added diagnostics to clightgen. * Fix error handling of AsmToJson. * Cleanup error handling of Elab and C2C. *The implementation of location printing (file & line) is simplified and correctly prints valid filenames with invalid lines. --- cparser/Rename.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cparser/Rename.ml') diff --git a/cparser/Rename.ml b/cparser/Rename.ml index f402ea39..cdb5751e 100644 --- a/cparser/Rename.ml +++ b/cparser/Rename.ml @@ -83,7 +83,7 @@ let ident env id = try IdentMap.find id env.re_id with Not_found -> - Cerrors.fatal_error no_loc "internal error: rename: %s__%d unbound" + Diagnostics.fatal_error Diagnostics.no_loc "internal error: rename: %s__%d unbound" id.name id.stamp let rec typ env = function -- cgit