From: Michael Tokarev <mjt@tls.msk.ru>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: qemu-trivial@nongnu.org, qemu-devel@nongnu.org, patches@linaro.org
Subject: Re: [Qemu-trivial] [PATCH] configure: disable clang -Wstring-plus-int warning
Date: Sun, 01 Sep 2013 19:07:14 +0400 [thread overview]
Message-ID: <52235822.3040203@msgid.tls.msk.ru> (raw)
In-Reply-To: <1375730200-22203-1-git-send-email-peter.maydell@linaro.org>
05.08.2013 23:16, Peter Maydell wrote:
> 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.
Thanks, applied to the trivial-patches queue.
/mjt
WARNING: multiple messages have this Message-ID (diff)
From: Michael Tokarev <mjt@tls.msk.ru>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: qemu-trivial@nongnu.org, qemu-devel@nongnu.org, patches@linaro.org
Subject: Re: [Qemu-devel] [Qemu-trivial] [PATCH] configure: disable clang -Wstring-plus-int warning
Date: Sun, 01 Sep 2013 19:07:14 +0400 [thread overview]
Message-ID: <52235822.3040203@msgid.tls.msk.ru> (raw)
In-Reply-To: <1375730200-22203-1-git-send-email-peter.maydell@linaro.org>
05.08.2013 23:16, Peter Maydell wrote:
> 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.
Thanks, applied to the trivial-patches queue.
/mjt
next prev parent reply other threads:[~2013-09-01 15:07 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 ` [Qemu-trivial] " Markus Armbruster
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 ` Michael Tokarev [this message]
2013-09-01 15:07 ` [Qemu-devel] [Qemu-trivial] " 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=52235822.3040203@msgid.tls.msk.ru \
--to=mjt@tls.msk.ru \
--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.