diff options
author | xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e> | 2013-06-21 07:41:32 +0000 |
---|---|---|
committer | xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e> | 2013-06-21 07:41:32 +0000 |
commit | 001222523a8d3ed758761916d85432b8dde2b2c2 (patch) | |
tree | 8206e5b30d9b4ee86093d576a833e93615cb060e /cparser/Cutil.ml | |
parent | 794b0530851265d08e369ff2eaf791b47b48c829 (diff) | |
download | compcert-001222523a8d3ed758761916d85432b8dde2b2c2.tar.gz compcert-001222523a8d3ed758761916d85432b8dde2b2c2.zip |
Recognize attribute((packed)) after a "struct {...}" and not just between "struct" and "{", for compatibility with GCC.
git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@2285 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e
Diffstat (limited to 'cparser/Cutil.ml')
-rw-r--r-- | cparser/Cutil.ml | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/cparser/Cutil.ml b/cparser/Cutil.ml index 212303ae..2fc269cc 100644 --- a/cparser/Cutil.ml +++ b/cparser/Cutil.ml @@ -141,6 +141,12 @@ let remove_attributes_type env attr t = let erase_attributes_type env t = change_attributes_type env (fun a -> []) t +(* Is an attribute type-related (true) or variable-related (false)? *) + +let attr_is_type_related = function + | Attr(("packed" | "__packed__"), _) -> true + | _ -> false + (* Type compatibility *) exception Incompat |