diff options
author | xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e> | 2011-05-12 09:41:09 +0000 |
---|---|---|
committer | xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e> | 2011-05-12 09:41:09 +0000 |
commit | fe8baff11737d3785ff51d20ace9ab31665cd295 (patch) | |
tree | edbab0f933283d5ecf455a5f94150c4f09379c51 /cparser/Cleanup.ml | |
parent | 239cbd2ebab8814b11d7ef43c35a17ce56a7ba0b (diff) |
cparser: support for attributes over struct and union.
cparser: added experimental emulation of packed structs (PackedStruct.ml)
git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@1650 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e
Diffstat (limited to 'cparser/Cleanup.ml')
-rw-r--r-- | cparser/Cleanup.ml | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/cparser/Cleanup.ml b/cparser/Cleanup.ml index be28989..17b2f98 100644 --- a/cparser/Cleanup.ml +++ b/cparser/Cleanup.ml @@ -143,7 +143,7 @@ let rec add_needed_globdecls accu = function if needed f.fd_name then (add_fundef f; add_needed_globdecls accu rem) else add_needed_globdecls (g :: accu) rem - | Gcompositedef(_, id, flds) -> + | Gcompositedef(_, id, _, flds) -> if needed id then (List.iter add_field flds; add_needed_globdecls accu rem) else add_needed_globdecls (g :: accu) rem @@ -176,8 +176,8 @@ let rec simpl_globdecls accu = function match g.gdesc with | Gdecl((sto, id, ty, init) as decl) -> visible_decl decl || needed id | Gfundef f -> f.fd_storage = Storage_default || needed f.fd_name - | Gcompositedecl(_, id) -> needed id - | Gcompositedef(_, id, flds) -> needed id + | Gcompositedecl(_, id, _) -> needed id + | Gcompositedef(_, id, _, flds) -> needed id | Gtypedef(id, ty) -> needed id | Genumdef(id, enu) -> List.exists (fun (id, _) -> needed id) enu | Gpragma s -> true in |