On 04/05/2012 04:10 AM, Bruno Haible wrote:
> This patch will not help to fix Daniel Berrange's problem. In mingw
> and mingw64, ssize_t is defined by , and gnulib will not
> override it.
>
> Test program:
> foo.c =
> #include
> size_t a;
> ssize_t b;
> =
Eric Blake wrote:
> Then how do I explain the compiler
> warning that Daniel was seeing under mingw64?
They come from disagreements regarding the "integer conversion rank" of
'size_t' and 'ssize_t' between GCC and .
When you write printf("%zd",arg) then GCC compares its own built-in knowledge
abo
On 04/05/2012 07:05 AM, Daniel P. Berrange wrote:
> On Thu, Apr 05, 2012 at 06:07:20AM -0600, Eric Blake wrote:
>> On 04/05/2012 04:10 AM, Bruno Haible wrote:
>> You forgot to check one (64-bit mingw64):
>>
>> $ x86_64-w64-mingw32-gcc -E foo.c | grep size_t
>> __extension__ typedef unsigned long lo
On Thu, Apr 05, 2012 at 06:07:20AM -0600, Eric Blake wrote:
> On 04/05/2012 04:10 AM, Bruno Haible wrote:
> You forgot to check one (64-bit mingw64):
>
> $ x86_64-w64-mingw32-gcc -E foo.c | grep size_t
> __extension__ typedef unsigned long long size_t;
> __extension__ typedef long long ssize_t;
>
Hi Eric,
> We were blindly defining ssize_t to int. On mingw64, this is the
> correct size, but the wrong rank, which leads gcc to issue warnings
> for %zd printf directives.
>
> * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Match rank of size_t.
This patch will not help to fix Daniel Berrange's problem. I
We were blindly defining ssize_t to int. On mingw64, this is the
correct size, but the wrong rank, which leads gcc to issue warnings
for %zd printf directives.
* m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Match rank of size_t.
Signed-off-by: Eric Blake
---
Bruno, is this okay to apply?
ChangeLog |