From 21156a2fcf48764762c7f2209fa850024378d83a Mon Sep 17 00:00:00 2001 From: Bernhard Schommer Date: Fri, 29 Jul 2016 09:15:36 +0200 Subject: Classified all warnings and added various options. Now each warning either has a name and can be turned on/off, made into an error,etc. or is a warning that always will be triggered. The message of the warnings are similar to the ones emited by gcc/clang and all fit into one line. Furthermore the diagnostics are now colored if colored output is available. Bug 18004 --- cparser/Cerrors.mli | 31 +++++++++++++++++++++++++++---- 1 file changed, 27 insertions(+), 4 deletions(-) (limited to 'cparser/Cerrors.mli') diff --git a/cparser/Cerrors.mli b/cparser/Cerrors.mli index 3e315fad..3010241a 100644 --- a/cparser/Cerrors.mli +++ b/cparser/Cerrors.mli @@ -17,8 +17,31 @@ val warn_error : bool ref val reset : unit -> unit exception Abort val fatal_error_raw : ('a, out_channel, unit, 'b) format4 -> 'a -val fatal_error : ('a, Format.formatter, unit, unit, unit, 'b) format6 -> 'a -val error : ('a, Format.formatter, unit, unit, unit, unit) format6 -> 'a -val warning : ('a, Format.formatter, unit, unit, unit, unit) format6 -> 'a -val info : ('a, Format.formatter, unit, unit, unit, unit) format6 -> 'a val check_errors : unit -> bool + +type warning_type = + | Unnamed + | Unknown_attribute + | Zero_length_array + | Celeven_extension + | Gnu_empty_struct + | Missing_declarations + | Constant_conversion + | Int_conversion + | Varargs + | Implicit_function_declaration + | Pointer_type_mismatch + | Compare_distinct_pointer_types + | Pedantic + | Main_return_type + | Invalid_noreturn + | Return_type + | Literal_range + | Unknown_pragmas + +val warning : (string * int) -> warning_type -> ('a, Format.formatter, unit, unit, unit, unit) format6 -> 'a +val error : (string * int) -> ('a, Format.formatter, unit, unit, unit, unit) format6 -> 'a +val fatal_error : (string * int) -> ('a, Format.formatter, unit, unit, unit, 'b) format6 -> 'a + +val warning_help : string +val warning_options : (Commandline.pattern * Commandline.action) list -- cgit