aboutsummaryrefslogtreecommitdiffstats
path: root/cparser/Cerrors.ml
diff options
context:
space:
mode:
authorBernhard Schommer <bernhardschommer@gmail.com>2016-11-22 17:36:41 +0100
committerBernhard Schommer <bernhardschommer@gmail.com>2016-11-22 17:36:41 +0100
commitc2ec127c0ae164d09d5952131dfaea9596e2c61d (patch)
tree10cd8bba0ff378b00db5c2249086fd09f02913e1 /cparser/Cerrors.ml
parent252a3b44b1cda99344a7554d1d770cabc47a3102 (diff)
downloadcompcert-c2ec127c0ae164d09d5952131dfaea9596e2c61d.tar.gz
compcert-c2ec127c0ae164d09d5952131dfaea9596e2c61d.zip
Warning for decls without name in composites.
The warning missing declarations is now also triggered for declarations without name in field lists of composite types if the declaration is not an anonymous composite or a bitfield member.
Diffstat (limited to 'cparser/Cerrors.ml')
-rw-r--r--cparser/Cerrors.ml10
1 files changed, 5 insertions, 5 deletions
diff --git a/cparser/Cerrors.ml b/cparser/Cerrors.ml
index a38cceee..6bbe4b5b 100644
--- a/cparser/Cerrors.ml
+++ b/cparser/Cerrors.ml
@@ -224,19 +224,19 @@ let pp_key key fmt =
fprintf fmt "%s%t@." key rsc
let pp_loc fmt (filename,lineno) =
- if filename <> "" then
- fprintf fmt "%t%s:%d:%t" bc filename lineno rsc
+ if filename <> "" && lineno <> -10 && filename <> "cabs loc unknown" then
+ fprintf fmt "%t%s:%d:%t " bc filename lineno rsc
let error key loc fmt =
incr num_errors;
kfprintf (pp_key key)
- err_formatter ("%a %terror:%t %t" ^^ fmt) pp_loc loc rc rsc bc
+ err_formatter ("%a%terror:%t %t" ^^ fmt) pp_loc loc rc rsc bc
let fatal_error key loc fmt =
incr num_errors;
kfprintf
(fun fmt -> pp_key key fmt;raise Abort)
- err_formatter ("%a %terror:%t %t" ^^ fmt) pp_loc loc rc rsc bc
+ err_formatter ("%a%terror:%t %t" ^^ fmt) pp_loc loc rc rsc bc
let warning loc ty fmt =
let kind,key = classify_warning ty in
@@ -248,7 +248,7 @@ let warning loc ty fmt =
| WarningMsg ->
incr num_warnings;
kfprintf (pp_key key)
- err_formatter ("%a %twarning:%t %t" ^^ fmt) pp_loc loc mc rsc bc
+ err_formatter ("%a%twarning:%t %t" ^^ fmt) pp_loc loc mc rsc bc
| SuppressedMsg -> ifprintf err_formatter fmt
let error loc fmt =