lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


> On Tue, Oct 26, 2010 at 8:01 AM, Roberto Ierusalimschy
> <roberto@inf.puc-rio.br> wrote:
> >> http://msdn.microsoft.com/en-us/library/ke55d167(v=VS.100).aspx ....
> > They really could not care less for portability...
> 
> I guess you mean the i64 thing [1], with the only recent addition of
> C99 stdint.h (but not inttypes.h) [2-3].

I mean that they assume that code for 64-bit machines is not intended to
run on 32-bit machines.


> >> The below patch makes it happy. [...]
> > It does not seem to cover all shift-warnings in your original message...
> 
> Concerning the 5.2 warnings, most seem to be about things like
> implicitly, rather than explicitly, casting a wider type (size_t or
> ptrdiff_t) into a narrower type (int), with the possible data loss
> that might be unintended.  gcc (64 not 32) gives similar warnings and
> others if you use -Wconversion (not just -Wall).

It might be a coincidence, but all cases in your fixes the macro
'sizenode' was used in a context where it would naturally be converted
to size_t. There are other cases where it should (or could) remain an int.

-- Roberto