From: Laurent Vivier <laurent@vivier.eu>
To: Peter Maydell <peter.maydell@linaro.org>, qemu-devel@nongnu.org
Cc: Riku Voipio <riku.voipio@iki.fi>,
Richard Henderson <richard.henderson@linaro.org>,
patches@linaro.org
Subject: Re: [Qemu-devel] [PATCH] linux-user: Suppress address-of-packed-member warnings in __get/put_user_e
Date: Fri, 5 Oct 2018 02:28:25 +0200 [thread overview]
Message-ID: <eee0054a-4d73-53a2-ca52-dbce4f1996e5@vivier.eu> (raw)
In-Reply-To: <52177933-047f-d99b-e7d7-2a85e4c8d59c@vivier.eu>
On 04/10/2018 18:55, Laurent Vivier wrote:
> Le 28/09/2018 à 16:25, Peter Maydell a écrit :
>> Our __get_user_e() and __put_user_e() macros cause newer versions
>> of clang to generate false-positive -Waddress-of-packed-member
>> warnings if they are passed the address of a member of a packed
>> struct (see https://bugs.llvm.org/show_bug.cgi?id=39113).
>> Suppress these using the _Pragma() operator.
>>
>> To put in the pragmas we need to convert the macros from
>> expressions to statements, but all the callsites effectively
>> treat them as statements already so this is OK.
>>
>> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
>> ---
>> linux-user/qemu.h | 57 +++++++++++++++++++++++++++++++----------------
>> 1 file changed, 38 insertions(+), 19 deletions(-)
>>
>
> Applied to my linux-user branch.
I have the following error when building on Fedora 28 and gcc (GCC)
8.1.1 20180712 (Red Hat 8.1.1-5)
CC aarch64_be-linux-user/target/arm/arm-semi.o
.../target/arm/arm-semi.c: In function ‘do_arm_semihosting’:
.../target/arm/arm-semi.c:270:1: error: unknown option after ‘#pragma
GCC diagnostic’ kind [-Werror=pragmas]
Perhaps you should use a "#if defined(__clang__)" to apply your fix only
to clang?
Thanks,
Laurent
next prev parent reply other threads:[~2018-10-05 0:28 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20180928142533.8451-1-peter.maydell@linaro.org>
2018-10-04 16:55 ` [Qemu-devel] [PATCH] linux-user: Suppress address-of-packed-member warnings in __get/put_user_e Laurent Vivier
2018-10-05 0:28 ` Laurent Vivier [this message]
2018-10-05 9:10 ` Peter Maydell
2018-10-05 9:43 ` Laurent Vivier
2018-10-05 15:25 ` Richard Henderson
2018-10-05 16:09 ` Laurent Vivier
2018-10-09 11:59 ` Peter Maydell
2018-10-09 14:52 ` Peter Maydell
2018-10-09 14:57 ` Laurent Vivier
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=eee0054a-4d73-53a2-ca52-dbce4f1996e5@vivier.eu \
--to=laurent@vivier.eu \
--cc=patches@linaro.org \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.org \
--cc=riku.voipio@iki.fi \
/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).