diff options
author | Bernhard Schommer <bernhardschommer@gmail.com> | 2016-07-29 09:15:36 +0200 |
---|---|---|
committer | Bernhard Schommer <bernhardschommer@gmail.com> | 2016-07-29 09:15:36 +0200 |
commit | 21156a2fcf48764762c7f2209fa850024378d83a (patch) | |
tree | e56bb6ee6b8099b3520c4e97ccd1cd776ff9eb7a /cparser/Cerrors.mli | |
parent | c7832c32253cdc2123313731c7cbbace4fc8332c (diff) | |
download | compcert-21156a2fcf48764762c7f2209fa850024378d83a.tar.gz compcert-21156a2fcf48764762c7f2209fa850024378d83a.zip |
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
Diffstat (limited to 'cparser/Cerrors.mli')
-rw-r--r-- | cparser/Cerrors.mli | 31 |
1 files changed, 27 insertions, 4 deletions
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 |