aboutsummaryrefslogtreecommitdiffstats
path: root/driver
diff options
context:
space:
mode:
authorXavier Leroy <xavier.leroy@inria.fr>2015-08-25 14:00:14 +0200
committerXavier Leroy <xavier.leroy@inria.fr>2015-08-25 14:00:14 +0200
commit7cfaf10b604372044f53cb65b03df33c23f8b26d (patch)
tree9086ba4204bae732b5567aa5fd37de71887757ff /driver
parentc642e761fa8943584343c3097a53019244cd74cf (diff)
downloadcompcert-7cfaf10b604372044f53cb65b03df33c23f8b26d.tar.gz
compcert-7cfaf10b604372044f53cb65b03df33c23f8b26d.zip
Improve printing of internal compiler errors.
Diffstat (limited to 'driver')
-rw-r--r--driver/Driver.ml4
1 files changed, 2 insertions, 2 deletions
diff --git a/driver/Driver.ml b/driver/Driver.ml
index 7832e6d2..b646dc83 100644
--- a/driver/Driver.ml
+++ b/driver/Driver.ml
@@ -183,7 +183,7 @@ let compile_c_ast sourcename csyntax ofile debug =
| Errors.OK asm ->
Asmexpand.expand_program asm
| Errors.Error msg ->
- print_error stderr msg;
+ eprintf "%s: %a" sourcename print_error msg;
exit 2 in
(* Dump Asm in binary and JSON format *)
if !option_sdump then
@@ -221,7 +221,7 @@ let compile_cminor_file ifile ofile =
(CMtypecheck.type_program
(CMparser.prog CMlexer.token lb)) with
| Errors.Error msg ->
- print_error stderr msg;
+ eprintf "%s: %a" ifile print_error msg;
exit 2
| Errors.OK p ->
let oc = open_out ofile in