Look at this sample C code (extracted a test case as an example):
unsigned long a, b;
c = 32;
a = 0xffffffff << 32;
b = 0xffffffff << c;
printf ("a=%x, b=%x\n", a, b);
In C it is undefined behavior to left shift more than the width of the promoted operand.
(C99, 6.5.7p3) "If the value of the right operand is negative or is greater than or equal to the width of the promoted left operand, the behavior is undefined."
I assume in the examples below
unsigned int types are 32-bit.
The type of an unsuffixed hexadecimal integer constant is the first in the corresponding list in which its value can be represented:
unsigned long long.
0xFFFFFFFF is of type
unsigned int and
0xFFFFFFFF << 32 is undefined behavior.