aboutsummaryrefslogtreecommitdiffstats
path: root/cparser/Bitfields.ml
diff options
context:
space:
mode:
Diffstat (limited to 'cparser/Bitfields.ml')
-rw-r--r--cparser/Bitfields.ml2
1 files changed, 2 insertions, 0 deletions
diff --git a/cparser/Bitfields.ml b/cparser/Bitfields.ml
index efb82b01..9ca40e70 100644
--- a/cparser/Bitfields.ml
+++ b/cparser/Bitfields.ml
@@ -193,6 +193,8 @@ let transf_composite env loc su id attr ml =
if List.for_all (fun f -> f.fld_bitfield = None) ml then
(attr, ml)
else begin
+ if find_custom_attributes ["packed";"__packed__"] attr <> [] then
+ Diagnostics.error loc "bitfields in packed structs not allowed";
let ml' =
match su with
| Struct -> transf_struct_members env id 1 ml