All of lore.kernel.org
 help / color / mirror / Atom feed
From: Markus Armbruster <armbru@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: qemu-trivial@nongnu.org, qemu-devel@nongnu.org, patches@linaro.org
Subject: Re: [Qemu-trivial] [Qemu-devel] [PATCH] configure: disable clang -Wstring-plus-int warning
Date: Tue, 06 Aug 2013 09:22:22 +0200	[thread overview]
Message-ID: <87d2pr1dxt.fsf@blackfin.pond.sub.org> (raw)
In-Reply-To: <1375730200-22203-1-git-send-email-peter.maydell@linaro.org> (Peter Maydell's message of "Mon, 5 Aug 2013 20:16:40 +0100")

Peter Maydell <peter.maydell@linaro.org> writes:

> Some versions of clang will warn about adding integers to strings:
>
> disas/i386.c:4753:23: error: adding 'char' to a string does not append
>       to the string [-Werror,-Wstring-plus-int]
>       oappend ("%es:" + intel_syntax);
>                ~~~~~~~^~~~~~~~~~~~~~
> disas/i386.c:4753:23: note: use array indexing to silence this warning
>       oappend ("%es:" + intel_syntax);
>                       ^
>                &      [             ]
>
> disas/i386.c uses this idiom to to skip a "%" prefix if using intel
> rather than AT&T syntax. This seems like a reasonable  thing to do,
> and I don't think anybody contributing to QEMU is likely to believe
> that '+' is a string concatenation operator in C, so just disable
> -Wstring-plus-int.
>
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>

Yes, please.


WARNING: multiple messages have this Message-ID (diff)
From: Markus Armbruster <armbru@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: qemu-trivial@nongnu.org, qemu-devel@nongnu.org, patches@linaro.org
Subject: Re: [Qemu-devel] [PATCH] configure: disable clang -Wstring-plus-int warning
Date: Tue, 06 Aug 2013 09:22:22 +0200	[thread overview]
Message-ID: <87d2pr1dxt.fsf@blackfin.pond.sub.org> (raw)
In-Reply-To: <1375730200-22203-1-git-send-email-peter.maydell@linaro.org> (Peter Maydell's message of "Mon, 5 Aug 2013 20:16:40 +0100")

Peter Maydell <peter.maydell@linaro.org> writes:

> Some versions of clang will warn about adding integers to strings:
>
> disas/i386.c:4753:23: error: adding 'char' to a string does not append
>       to the string [-Werror,-Wstring-plus-int]
>       oappend ("%es:" + intel_syntax);
>                ~~~~~~~^~~~~~~~~~~~~~
> disas/i386.c:4753:23: note: use array indexing to silence this warning
>       oappend ("%es:" + intel_syntax);
>                       ^
>                &      [             ]
>
> disas/i386.c uses this idiom to to skip a "%" prefix if using intel
> rather than AT&T syntax. This seems like a reasonable  thing to do,
> and I don't think anybody contributing to QEMU is likely to believe
> that '+' is a string concatenation operator in C, so just disable
> -Wstring-plus-int.
>
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>

Yes, please.

  reply	other threads:[~2013-08-06  7:22 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-05 19:16 [Qemu-trivial] [PATCH] configure: disable clang -Wstring-plus-int warning Peter Maydell
2013-08-05 19:16 ` [Qemu-devel] " Peter Maydell
2013-08-06  7:22 ` Markus Armbruster [this message]
2013-08-06  7:22   ` Markus Armbruster
2013-08-20 13:01 ` [Qemu-trivial] " Peter Maydell
2013-08-20 13:01   ` Peter Maydell
2013-09-01 15:07 ` [Qemu-trivial] " Michael Tokarev
2013-09-01 15:07   ` [Qemu-devel] " Michael Tokarev

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=87d2pr1dxt.fsf@blackfin.pond.sub.org \
    --to=armbru@redhat.com \
    --cc=patches@linaro.org \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@nongnu.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.