[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 2/6] configure: avoid new clang 11+ warnings
From: |
Paolo Bonzini |
Subject: |
Re: [PATCH v2 2/6] configure: avoid new clang 11+ warnings |
Date: |
Mon, 26 Oct 2020 16:12:07 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.3.1 |
On 26/10/20 16:03, Daniele Buono wrote:
> Hi Paolo,
> I reorganized UASStatus to put uas_iu at the end and it works fine.
> Unfortunately, this uncovered another part of the code with a similar
> issue (variable sized type not at the end of the struct), here:
>
> In file included from ../qemu-cfi-v3/target/s390x/diag.c:21:
> ../qemu-cfi-v3/hw/s390x/ipl.h:161:23: error: field 'iplb' with variable
> sized type 'IplParameterBlock' (aka 'union IplParameterBlock') not at
> the end of a struct or class is a GNU extension
> [-Werror,-Wgnu-variable-sized-type-not-at-end]
> IplParameterBlock iplb;
> ^
> ../qemu-cfi-v3/hw/s390x/ipl.h:162:23: error: field 'iplb_pv' with
> variable sized type 'IplParameterBlock' (aka 'union IplParameterBlock')
> not at the end of a struct or class is a GNU extension
> [-Werror,-Wgnu-variable-sized-type-not-at-end]
> IplParameterBlock iplb_pv;
>
> My understanding is that each of these IplParameterBlock may contain
> either a IPLBlockPV or a IplBlockFcp, which both end with a variable
> sized field (an array).
>
> Adding maintainers of s390x to see if they have a suggested solution to
> avoid disabling the warning.
This one seems okay because the union constrains the size to 4K. If
"[0]" is enough to shut up the compiler, I'd say do that.
Paolo
- [PATCH v2 0/6] Add support for Control-Flow Integrity, Daniele Buono, 2020/10/23
- [PATCH v2 1/6] fuzz: Make fork_fuzz.ld compatible with LLVM's LLD, Daniele Buono, 2020/10/23
- [PATCH v2 2/6] configure: avoid new clang 11+ warnings, Daniele Buono, 2020/10/23
- Re: [PATCH v2 2/6] configure: avoid new clang 11+ warnings, Thomas Huth, 2020/10/24
- Re: [PATCH v2 2/6] configure: avoid new clang 11+ warnings, Paolo Bonzini, 2020/10/26
- Re: [PATCH v2 2/6] configure: avoid new clang 11+ warnings, Daniele Buono, 2020/10/26
- Re: [PATCH v2 2/6] configure: avoid new clang 11+ warnings,
Paolo Bonzini <=
- Re: [PATCH v2 2/6] configure: avoid new clang 11+ warnings, Daniele Buono, 2020/10/26
- Re: [PATCH v2 2/6] configure: avoid new clang 11+ warnings, Peter Maydell, 2020/10/26
- Re: [PATCH v2 2/6] configure: avoid new clang 11+ warnings, Thomas Huth, 2020/10/27
- Re: [PATCH v2 2/6] configure: avoid new clang 11+ warnings, Cornelia Huck, 2020/10/27
- Re: [PATCH v2 2/6] configure: avoid new clang 11+ warnings, Daniele Buono, 2020/10/27
[PATCH v2 3/6] configure: add option to enable LTO, Daniele Buono, 2020/10/23