Left Shift more than 15 bits fails?

Just use 1L << 30 or 1UL << 30.

Expressions (and so numbers) are evaluated as 16 bit by default,
if the operand is given an explicit type, it is used.