qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Weil <sw@weilnetz.de>
To: Richard Henderson <rth@twiddle.net>, qemu-devel@nongnu.org
Cc: Peter Maydell <peter.maydell@linaro.org>
Subject: Re: [Qemu-devel] [PATCH] libvixl: Add gcc format attribute
Date: Wed, 18 Jun 2014 06:45:03 +0200	[thread overview]
Message-ID: <53A1194F.606@weilnetz.de> (raw)
In-Reply-To: <53A1163A.1060902@weilnetz.de>

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	other threads:[~2014-06-18  4:45 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-17 21:07 [Qemu-devel] [PATCH] libvixl: Add gcc format attribute Stefan Weil
2014-06-17 22:09 ` Peter Maydell
2014-06-18  4:16   ` Stefan Weil
2014-06-18  4:28 ` Richard Henderson
2014-06-18  4:31   ` Stefan Weil
2014-06-18  4:45     ` Stefan Weil [this message]
2014-06-18  8:26       ` Peter Maydell
2014-06-18 14:52       ` Paolo Bonzini
2014-06-18 15:19       ` Richard Henderson
2014-06-18 17:27         ` Stefan Weil
2014-06-18 17:33           ` Peter Maydell
2014-06-18 17:43           ` Peter Maydell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=53A1194F.606@weilnetz.de \
    --to=sw@weilnetz.de \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=rth@twiddle.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).