diff options
author | Bernhard Schommer <bschommer@users.noreply.github.com> | 2018-08-20 10:42:22 +0200 |
---|---|---|
committer | Xavier Leroy <xavierleroy@users.noreply.github.com> | 2018-08-20 10:42:21 +0200 |
commit | e9b5632617b1477603883aab543994e2a1c464ce (patch) | |
tree | d2f67322c1ff09ed2a6c6c3aa64e8b40421ade33 /cparser/Cutil.mli | |
parent | 6fc89e5c8c4a8f98ef0a4a03c00994bbfb146431 (diff) | |
download | compcert-e9b5632617b1477603883aab543994e2a1c464ce.tar.gz compcert-e9b5632617b1477603883aab543994e2a1c464ce.zip |
Additional checks for flex arrays in structs (#93)
* Error for structs with only flex array member
Flexible array members are only allowed if another member exists.
Bug 23324
* Added checks for nesting of structs with flex array members
Warn if a struct with a flex array member is used as array element
or member of another struct. Such usage is dubious.
Bug 23324
Don't warn if the struct-with-flex-array is a member of an union.
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 5ae5dcd7..9b09a413 100644 --- a/cparser/Cutil.mli +++ b/cparser/Cutil.mli @@ -250,6 +250,8 @@ val is_volatile_variable: Env.t -> exp -> bool (* Test whether the expression is an access to a volatile variable *) val is_bitfield: Env.t -> exp -> bool (* Test whether the expression is a bit-field *) +val contains_flex_array_mem : Env.t -> typ -> bool + (* Is this a struct with a flexible array member *) (* Constructors *) |