Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Edited by sciSpider v2.1 (sch jbop) (X_X)@==(Q_Q)@

...

This is a similar issue to the signedness of plain char, discussed in INT07-AC. Use only explicitly signed or unsigned char type for numeric values.  A plain int bit-field that is treated as unsigned will promote to int as long as its field width is less than that of int, because int can hold all values of the original type.  This is the same behavior as that of a plain char treated as unsigned.  However, a plain int bit-field treated as unsigned will promote to unsigned int if its field width is the same as that of int.  This difference makes a plain int bit-field even trickier than a plain char.

...