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

no, I don't know any reason to use e.g. signed int zero bit field instead of unsigned.

But I don't see a reason to impose using unsigned int in this case - it provides no value, as far as I know.

The rule explains further that \"A signed bit field of 1 bit length is not useful.\". This seems to suggest that the rule is concerned about usefulness of the code - and signed int zero bit fields are still useful.

In fact, shouldn't all unnamed bit fields be excluded from the scope of Rules 6.5 and 6.5? Do they have any use other than padding? If not, their type should not matter in my opinion.


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)