diff options
author | Bernhard Schommer <bernhardschommer@gmail.com> | 2016-11-22 17:36:41 +0100 |
---|---|---|
committer | Bernhard Schommer <bernhardschommer@gmail.com> | 2016-11-22 17:36:41 +0100 |
commit | c2ec127c0ae164d09d5952131dfaea9596e2c61d (patch) | |
tree | 10cd8bba0ff378b00db5c2249086fd09f02913e1 /cparser/Cutil.ml | |
parent | 252a3b44b1cda99344a7554d1d770cabc47a3102 (diff) | |
download | compcert-kvx-c2ec127c0ae164d09d5952131dfaea9596e2c61d.tar.gz compcert-kvx-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/Cutil.ml')
-rw-r--r-- | cparser/Cutil.ml | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/cparser/Cutil.ml b/cparser/Cutil.ml index 19a32a7e..4d0cd735 100644 --- a/cparser/Cutil.ml +++ b/cparser/Cutil.ml @@ -683,6 +683,11 @@ let is_function_type env t = | TFun _ -> true | _ -> false +let is_anonymous_composite = function + | TStruct (id,_) + | TUnion (id,_) -> id.C.name = "" + | _ -> false + (* Find the info for a field access *) let field_of_dot_access env t m = |