Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
10.1 the calculation "50 << 3U" looks safe to me
#5
Thank you for the reply. However it does not make sense to me. The result will be a signed integer with the value 400. Therefore there is still a sign bit.

It seems you confuse the type rules. For most other binary operators the result type depends on both operand types. For instance, as you know, if you have "50 + 3U" then the result is unsigned. But the result type of > is the promoted LHS type so the "50
<t></t>


Messages In This Thread

Forum Jump:


Users browsing this thread: 6 Guest(s)