diff options
author | xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e> | 2013-12-28 09:47:40 +0000 |
---|---|---|
committer | xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e> | 2013-12-28 09:47:40 +0000 |
commit | de0ae111b043a473d78b510364d9447cf54fed27 (patch) | |
tree | e33da3522aeaa0f165efbd2db7aa6b02b440c747 /cfrontend/C2C.ml | |
parent | e248bbeb6ae319e79715126d18569c2bd856cc75 (diff) | |
download | compcert-de0ae111b043a473d78b510364d9447cf54fed27.tar.gz compcert-de0ae111b043a473d78b510364d9447cf54fed27.zip |
Check in C2C that packed structs were properly emulated.
PackedStructs.ml: remove "packed" attribute once processed.
git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@2388 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e
Diffstat (limited to 'cfrontend/C2C.ml')
-rw-r--r-- | cfrontend/C2C.ml | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/cfrontend/C2C.ml b/cfrontend/C2C.ml index 45ff80f7..16c85edc 100644 --- a/cfrontend/C2C.ml +++ b/cfrontend/C2C.ml @@ -836,8 +836,10 @@ let convertGlobvar loc env (sto, id, ty, optinit) = let checkComposite env si id attr flds = let checkField f = if f.fld_bitfield <> None then - unsupported "bit field in struct or union (consider adding option -fbitfields)" - in List.iter checkField flds + unsupported "bit field in struct or union (consider adding option -fbitfields)" in + List.iter checkField flds; + if Cutil.find_custom_attributes ["packed";"__packed__"] attr <> [] then + unsupported "packed struct (consider adding option -fpacked-struct)" (** Convert a list of global declarations. Result is a list of CompCert C global declarations (functions + |