diff options
author | Bernhard Schommer <bernhardschommer@gmail.com> | 2019-09-30 17:27:23 +0200 |
---|---|---|
committer | Bernhard Schommer <bschommer@users.noreply.github.com> | 2019-09-30 17:32:25 +0200 |
commit | d09786a563c7cbea8aa27c0e7da0dff4231b9253 (patch) | |
tree | 5f02a672362a959741da855329a1d3c64f1ad63c /cparser/Cutil.mli | |
parent | a8586f12b75687061a6d8df9d23696d35f4472f0 (diff) | |
download | compcert-kvx-d09786a563c7cbea8aa27c0e7da0dff4231b9253.tar.gz compcert-kvx-d09786a563c7cbea8aa27c0e7da0dff4231b9253.zip |
Various improvements for diagnostics.
* Extend check for incomplete type.
Extended the check to also include a check for variables with
incomplete object type that are not arrays, that have an
initializer. Furthermore the warning includes the type and variable
name.
* Warning for incomplete type in compound literals.
Incomplete types are not allowed for compound literals, except for
array types.
* Extend type printing function.
The type of a typedeof of an anonymous type should not be printed.
Furthermore added '<anonymous>' to the printing of anonymous types.
* Unify incomplete type errors message.
The incomplete type error messages should all look the same including
name of the variable, parameter, etc. and then the incomplete type.
Diffstat (limited to 'cparser/Cutil.mli')
-rw-r--r-- | cparser/Cutil.mli | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/cparser/Cutil.mli b/cparser/Cutil.mli index f6c4627d..2ddee78c 100644 --- a/cparser/Cutil.mli +++ b/cparser/Cutil.mli @@ -174,6 +174,8 @@ val is_function_pointer_type : Env.t -> typ -> bool (* Is type a pointer to function type? *) val is_anonymous_composite : typ -> bool (* Is type an anonymous composite? *) +val is_anonymous_type : typ -> bool + (* Is the type an anonymous composite or enum *) val is_qualified_array : typ -> bool (* Does the type contain a qualified array type (e.g. int[const 5])? *) val pointer_arithmetic_ok : Env.t -> typ -> bool |