From 39bca2093650f3dbe18e60ad19818b939a96b971 Mon Sep 17 00:00:00 2001 From: Bernhard Schommer Date: Mon, 6 May 2019 17:00:10 +0200 Subject: Ensure flushing of the error formatter. Since the error formatter is not automatically flushed at program exit we need to ensure that it is flushed at exit. --- cparser/Diagnostics.ml | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'cparser') diff --git a/cparser/Diagnostics.ml b/cparser/Diagnostics.ml index 172affab..2b8a3eb4 100644 --- a/cparser/Diagnostics.ml +++ b/cparser/Diagnostics.ml @@ -18,6 +18,10 @@ open Format open Commandline +(* Ensure that the error formatter is flushed at exit *) +let _ = + at_exit (pp_print_flush err_formatter) + (* Should errors be treated as fatal *) let error_fatal = ref false -- cgit