Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Rule 6.5 and unnamed 0-length bit field
#5
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


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)