16-01-2008, 09:48 AM
I don't really see that zero-length bitfields are in the spirit of MISRA at all. Since the only point in a zero-length bit field is to attempt to force a particular packing it doesn't seem very compatible with the wording \"the packing together of short-length data to economise on storage is the only acceptable use of bit-fields envisaged in this document\" (MISRACV1 rule 111-113).
My personal position is that bit-fields are generally the wrong answer to any problem. That goes double for zero-length ones.
stephen
My personal position is that bit-fields are generally the wrong answer to any problem. That goes double for zero-length ones.
stephen