Hello team,

 

Simple code below is wrong, even when forcing to long or unsigned long :

 

            printf("%08x\n", ((~0) >> 1));

            printf("%08x\n", (unsigned long)((~(unsigned long)0) >> 1));

            printf("%08x\n", (long)((~(long)0) >> 1));

 

It prints

 

ffffffff while 7fffffff is expected.

 

Hope it helps to improve this nice little compiler.

 

Christian

_______________________________________________
Tinycc-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/tinycc-devel

Reply via email to