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 #3 from hidden_peak at mail dot ru  2007-03-01 14:48 -------
~((1ULL << 63ULL) >> 3ULL):

(0000 0000 0000 0001 << 63) -> 8000 0000 0000 0000 (unsigned!)
(8000 0000 0000 0000 >> 3 ) -> f000 0000 0000 0000 (due to sign bit)
~(f000 0000 0000 0000)      -> 0fff ffff ffff ffff

Right?


-- 

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]