aboutsummaryrefslogtreecommitdiffstats
path: root/cparser/Bitfields.ml
diff options
context:
space:
mode:
authorMichael Schmidt <github@mschmidt.me>2018-03-27 17:05:35 +0200
committerXavier Leroy <xavierleroy@users.noreply.github.com>2018-03-27 17:05:35 +0200
commit0096d6972fd7fec566024aff691c14d82d20ea80 (patch)
treeddb1372be811acd50da87586911f82dc0a1667c7 /cparser/Bitfields.ml
parent96abbcd8f25f03352ff397c2dd442015269722b8 (diff)
downloadcompcert-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.ml4
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