You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
uses int instead of unsigned for its expression. While not absolutely critical it could lead to negative numbers that are then converted to unsigned. Either cast h to uint16_t or simpler use u suffix for the constant 8. Then the integral promotion rules will use unsigned for the shift.
The right operand of << does not affect the result type.
C
Constraints
Each of the operands shall have integer type.
Semantics
The integer promotions are performed on each of the operands. The type of the result is
that of the promoted left operand. ...
C++
The operands shall be of integral or unscoped enumeration type and integral promotions are performed.
The type of the result is that of the promoted left operand. ...
uses
int
instead of unsigned for its expression. While not absolutely critical it could lead to negative numbers that are then converted to unsigned. Either cast h touint16_t
or simpler use u suffix for the constant 8. Then the integral promotion rules will use unsigned for the shift.The text was updated successfully, but these errors were encountered: