This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Left shift operations and the long long int datatype
- To: Jamie Lokier <egcs at tantalophile dot demon dot co dot uk>
- Subject: Re: Left shift operations and the long long int datatype
- From: Alex Buell <alex dot buell at tahallah dot demon dot co dot uk>
- Date: Mon, 20 Sep 1999 23:39:19 +0100 (BST)
- cc: Mailing List - GCC <egcs at egcs dot cygnus dot com>
- Reply-To: alex dot buell at tahallah dot demon dot co dot uk
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!