[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: various warnings in 5.1.4 and 5.2.0-work4 with icc/msvc64/splint
- From: Roberto Ierusalimschy <roberto@...>
- Date: Thu, 28 Oct 2010 09:07:46 -0200
> On Tue, Oct 26, 2010 at 8:01 AM, Roberto Ierusalimschy
> <firstname.lastname@example.org> 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 , 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.