This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/31007] wrong 64bit constant calculation



------- Comment #6 from hidden_peak at mail dot ru  2007-03-01 15:11 -------
> Shifting unsigned numbers doesn't replicate the sign bit.

unsigned ui3 = ~((1 << 31) >> 3);

printf( "%x\n", ui3 );

give me wrong result fffffff ?


-- 

hidden_peak at mail dot ru changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |UNCONFIRMED
         Resolution|INVALID                     |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31007


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]