Negative Operands for Shift Left/Right Operator
Closed this issue · 1 comments
MasterJH5574 commented
Hi! Is the operation undefined if any of the operands is a negative number in shift left/right operator?
For example, both -1 << 1
and 1 << -1
are undefined behaviors.
I think this should be undefined.
Thanks!
Engineev commented
Yes, they are undefined.