I found some wired problems when I tried to do left shift for 32 times. The code in the test function should print the same results of 0x0, but I got "ffffffff, 0" instead. Anybody could give a hint of what's wrong with the code? Thank you!
int test(int n) {
int mask = ~0 << (32 + ~n + 1);
int mask1 = ~0 << (32 + ~0 + 1);
printf("%x, %x\n", mask, mask1);
return mask;
}
int main(){
test(0);
}