Nicolas Joly wrote:
> On Tue, Sep 29, 2009 at 01:14:05PM -0400, Joel E. Denny wrote:
> [...]
>> With the following test program, I haven't persuaded gcc to give me a
>> warning or error:
>>
>> % cat >tmp.c <<EOF
>> #include <stdio.h>
>> int
>> main (void)
>> {
>>   size_t i = 0;
>>   printf ("%d\n", i);
>>   return 0;
>> }
>> EOF
>> % gcc -std=gnu99 -Wall -Wextra -Wno-sign-compare -Wcast-align -Wcast-qual 
>> -Wformat -Wpointer-arith -Wwrite-strings -Wbad-function-cast 
>> -Wmissing-declarations -Wmissing-prototypes -Wshadow -Wstrict-prototypes 
>> -Werror tmp.c
>>
>> Any ideas?
>
> You'll have a warning on archs where sizeof(size_t) != sizeof(int)
> such as x86_64 ...

I think you've nailed it.
That's definitely why it's happening for me.  I'm using x86_64.
Mustn't forget that systems with 32-bit size_t still exist.


Reply via email to