Unexpected unsigned-to-signed promotion

Plus the next sentence in the standard (which I just downloaded) is very relevant:

The behavior is undefined if the right operand is negative, or greater than or equal to the length in bits of the promoted left operand.

So, undefined behaviour. :stuck_out_tongue: