Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Rule 6.5 and unnamed 0-length bit field
#4
Hi pkruk,

I guess it might be to do with the stability of the rules.

The current rule is \"don't use less than two\".

If the rule was changed to \"don't use exactly one\", then there would be 1) a discontinuity, and 2) a change.

Since unsigned int : 0 can be used, there is a fully capable alternative, so no need to change the rule.

The undefined behaviour relates to not using signed or unsigned int, regardless of its use for zero length padding, and therefore still holds.

As the rule is written, signed bit fields are used to store data.

George


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)