3 ms·
Word-aligned? No, that's the opposite of packing! I'd say "packing" is ambiguous and could refer to either bit-aligned or byte-aligned data. But if your fields
by iainmerrick 8y ago
Word-aligned? No, that's the opposite of packing!
I'd say "packing" is ambiguous and could refer to either bit-aligned or byte-aligned data. But if your fields are less than 8 bits wide, I would assume "packing" means bit-packing.
- loeg 8y agoE.g., if your packed struct is { bool a; uint32_t b; }, you probably don't want a totally misaligned-by-one-bit 'b'.