This is the mail archive of the gcc@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]

Re: Left shift operations and the long long int datatype


On Tue, 21 Sep 1999, Jamie Lokier wrote:

> You mean (type)(~((type) 1 << ((sizeof(type) * 8) - 1)))
> 
> If you shift a 32-bit 1 left 63 times, don't be surprised to get 0.

Doh! How the heck did I miss that one?!?! Thank you. 

I shall go drown my head in the nearest toilet. :o)

Cheers, 
Alex 
-- 

Legalise cannabis today!

http://www.tahallah.demon.co.uk - updated!


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