[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] linux-user: Suppress address-of-packed-member w
From: |
Laurent Vivier |
Subject: |
Re: [Qemu-devel] [PATCH] linux-user: Suppress address-of-packed-member warnings in __get/put_user_e |
Date: |
Fri, 5 Oct 2018 11:43:51 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 |
On 05/10/2018 11:10, Peter Maydell wrote:
> On 5 October 2018 at 01:28, Laurent Vivier <address@hidden> wrote:
>> 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?
>
> I did test on gcc, but not that version. The point of the
> _Pragma("GCC diagnostic ignored \"-Wpragmas\"");
> line is to suppress that error (which it does on my gcc 5)
> so I don't know why your gcc is complaining :-(
You should add Fedora 28 to you collection of virtual machines :)
>
> If you add an extra diagnostic push, so:
>
> + _Pragma("GCC diagnostic push"); \
> + _Pragma("GCC diagnostic ignored \"-Wpragmas\""); \
> + _Pragma("GCC diagnostic push"); \
> + _Pragma("GCC diagnostic ignored \"-Waddress-of-packed-member\""); \
>
> and then a balancing extra
>
> + _Pragma("GCC diagnostic pop"); \
>
> at the end, I don't suppose that helps?
No, it doesn't help
> (I generally prefer to avoid marking things as clang- or gcc-
> specific where I can.)
I understand.
But it's a clang bug, it seems reasonable to have specific code to
workaround it.
Thanks,
Laurent
- Re: [Qemu-devel] [PATCH] linux-user: Suppress address-of-packed-member warnings in __get/put_user_e, Laurent Vivier, 2018/10/04
- Re: [Qemu-devel] [PATCH] linux-user: Suppress address-of-packed-member warnings in __get/put_user_e, Laurent Vivier, 2018/10/04
- Re: [Qemu-devel] [PATCH] linux-user: Suppress address-of-packed-member warnings in __get/put_user_e, Peter Maydell, 2018/10/05
- Re: [Qemu-devel] [PATCH] linux-user: Suppress address-of-packed-member warnings in __get/put_user_e,
Laurent Vivier <=
- Re: [Qemu-devel] [PATCH] linux-user: Suppress address-of-packed-member warnings in __get/put_user_e, Richard Henderson, 2018/10/05
- Re: [Qemu-devel] [PATCH] linux-user: Suppress address-of-packed-member warnings in __get/put_user_e, Laurent Vivier, 2018/10/05
- Re: [Qemu-devel] [PATCH] linux-user: Suppress address-of-packed-member warnings in __get/put_user_e, Peter Maydell, 2018/10/09
- Re: [Qemu-devel] [PATCH] linux-user: Suppress address-of-packed-member warnings in __get/put_user_e, Peter Maydell, 2018/10/09
- Re: [Qemu-devel] [PATCH] linux-user: Suppress address-of-packed-member warnings in __get/put_user_e, Laurent Vivier, 2018/10/09