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/Env.ml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'cparser/Env.ml') diff --git a/cparser/Env.ml b/cparser/Env.ml index dae79ef2..cbfafd48 100644 --- a/cparser/Env.ml +++ b/cparser/Env.ml @@ -260,17 +260,17 @@ let composite_tag_name name = let error_message = function | Unbound_identifier name -> - sprintf "Unbound identifier '%s'" name + sprintf "use of undeclared identifier '%s'" name | Unbound_tag(name, kind) -> - sprintf "Unbound %s '%s'" kind (composite_tag_name name) + sprintf "unbound %s '%s'" kind (composite_tag_name name) | Tag_mismatch(name, expected, actual) -> sprintf "'%s' was declared as a %s but is used as a %s" (composite_tag_name name) actual expected | Unbound_typedef name -> - sprintf "Unbound typedef '%s'" name + sprintf "unbound typedef '%s'" name | No_member(compname, compkind, memname) -> - sprintf "%s '%s' has no member named '%s'" - compkind (composite_tag_name compname) memname + sprintf "no member named '%s' in '%s %s'" + memname compkind (composite_tag_name compname) let _ = Printexc.register_printer -- cgit