为啥两段本质相同的代码执行结果不同

【为啥两段本质相同的代码执行结果不同】 整型移位超过其位数,是ub。编译器怎么处理都可以。
In any case, if the value of the right operand is negative or is greater or equal to the number of bits in the promoted left operand, the behavior is undefined.


    推荐阅读