diff options
author | Michael Schmidt <github@mschmidt.me> | 2018-03-27 17:05:35 +0200 |
---|---|---|
committer | Xavier Leroy <xavierleroy@users.noreply.github.com> | 2018-03-27 17:05:35 +0200 |
commit | 0096d6972fd7fec566024aff691c14d82d20ea80 (patch) | |
tree | ddb1372be811acd50da87586911f82dc0a1667c7 /cparser/Bitfields.ml | |
parent | 96abbcd8f25f03352ff397c2dd442015269722b8 (diff) | |
download | compcert-0096d6972fd7fec566024aff691c14d82d20ea80.tar.gz compcert-0096d6972fd7fec566024aff691c14d82d20ea80.zip |
Fix mistake in Bitfield transformation (#66)
Unions containing multiple bit fields were transformed incorrectly.
Diffstat (limited to 'cparser/Bitfields.ml')
-rw-r--r-- | cparser/Bitfields.ml | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cparser/Bitfields.ml b/cparser/Bitfields.ml index e0dccbd2..baf2b0ec 100644 --- a/cparser/Bitfields.ml +++ b/cparser/Bitfields.ml @@ -144,7 +144,7 @@ let rec transf_struct_members env id count = function end let rec transf_union_members env id count = function - [] -> [] + | [] -> [] | m :: ms -> (match m.fld_bitfield with | None -> m::transf_union_members env id count ms @@ -176,7 +176,7 @@ let rec transf_union_members env id count = function bf_signed = signed; bf_signed_res = signed2; bf_bool = is_bool}; { fld_name = carrier; fld_typ = carrier_typ; fld_bitfield = None; fld_anonymous = false;} - :: transf_struct_members env id (count + 1) ms) + :: transf_union_members env id (count + 1) ms) let transf_composite env su id attr ml = match su with |