Warning with 64-Bit datatype

Michael Pfeiffer pfeiffer@swac.de
Thu Jul 15 08:16:00 GMT 2004


Hi,

I get some warnings with following code:

__int64 hash;

hash=(hash<<1) & 0x7FFFFFFFFFFFFFFFL;

The warnings tell me that the constant is too long for the datatype of 
"hash". But when I count the digits of 0x7FFFFFFFFFFFFFFFL there are 
exactly 16 which are equal to 64 bit. It doesn't helps either when I 
change the datatype from __int64 to (unsigned) long long, so what could be 
the reason for this warning?

Michael

--

Available soon: The Linux Developer board at http://www.linuxboard.org



More information about the Gcc-help mailing list