qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] libvixl: Add gcc format attribute


From: Stefan Weil
Subject: Re: [Qemu-devel] [PATCH] libvixl: Add gcc format attribute
Date: Wed, 18 Jun 2014 06:45:03 +0200
User-agent: Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20100101 Thunderbird/24.5.0

Am 18.06.2014 06:31, schrieb Stefan Weil:
> Am 18.06.2014 06:28, schrieb Richard Henderson:
>>> I don't know the reason, because all locations seem to have arguments
>>> which are function calls, and the called function returns Instr which
>>> is uint32_t, not int64_t.
>> ...
>>> +  void GCC_FMT_ATTR(2, 3) AppendToOutput(const char* string, ...);
>>
>> It "helps" because 2,3 is wrong.  Correct would be 1,2 for this function.
>>
>>
>> r~
>>
> 
> No. This is a class member function, so there is an invisible fist

s/fist/first/

> "this" argument which counts for the gcc format attribute.
> 
> gcc would complain if the numbering were wrong.
> 
> Stefan


A 32 bit build on Ubuntu gcc-4.6.3-1ubuntu5 just finished and shows the
same error messages, so really all of my builds show them (32 and 64
bit, Linux native and cross for Windows).

Peter, I know that libvixl is external code, but posted this patch
because I need help: I simply don't know why the compiler complains and
whether these errors are really errors. It's easy to "fix" them by using
PRId64, but would that be correct?

Variable arguments usually are not converted to 64 bit values: if they
are smaller than int, they are expanded to int, and larger values are
passed as they are. But here obviously the compiler expands uint32_t to
int64_t. Why?

Stefan





reply via email to

[Prev in Thread] Current Thread [Next in Thread]