[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: [ANN] Lua 5.2.0 (beta-rc1) now available
- From: Florian Weimer <fw@...>
- Date: Tue, 14 Jun 2011 20:35:25 +0200
* Roberto Ierusalimschy:
>> 1) The macro twoto(x) defined as (1<<(x)) in lobject.h gives numerous
>> warnings when building on MSVC for 64 bits platforms.
>> The message is:
>> warning C4334: '<<' : result of 32-bit shift implicitly converted
>> to 64 bits (was 64-bit shift intended?)
> This is strange. As '1' is an int, the result from the shift should be
> an int, too.
I think it's complaining that you're shifting in 32 bits, and then
using the result only after conversion to 64 bits. (This probably
comes from the sizenode macro.) I don't know how commonly this leads
to actual errors in C code, but the warning would have saved me some
momentary puzzlement when writing Java code.