cat rshift.c #include <stdio.h> #include <stdlib.h> int main(void) { unsigned j = ~0 >> 8; unsigned i = ~0; i >>= 8;
printf("i = %x\n", i); printf("j = %x\n", j); exit(0); } gcc -o rshift rshift.c -Wall -g [EMAIL PROTECTED]:~/b1systems/ckurs> ./rshift i = ffffff j = ffffffff [EMAIL PROTECTED]:~/b1systems/ckurs> gcc --version gcc (GCC) 4.2.1 (SUSE Linux) Copyright (C) 2007 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Am I just doing something wrong? Why aren't i and j equal?