Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The type of the expression (bits.a << 24) is compiler dependent and may be either signed or unsigned depending on their interpretation of the standard.
The first interpretation is that when this value is used as an rvalue (e.g., lvalue = rvalue(wink) ;) the type is "unsigned int" as declared.  An unsigned int cannot be represented as an int so integer promotions require that this be an unsigned int, and hence "unsigned".

...