|
From: | Richard Henderson |
Subject: | Re: [PATCH 2/2] configure: Add -Wno-gnu-variable-sized-type-not-at-end |
Date: | Thu, 8 Sep 2022 12:37:37 +0100 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 |
On 9/8/22 10:09, Daniel P. Berrangé wrote:
'kvm_msrs info' is variable in size, so offset of 'entries[1]' is undefined by C99. I presume the GNU defined semantics are that the variable length 'entries[]' field in 'info' is zero-sized, in order to give predictable offset for 'entries[1]' in the local msr_data.
Correct. I invented this gcc extension for the benefit of glibc, which wanted to append N entries to that header, in static storage no less.
I still find it odd that clang warns about a gnu extension when gnu extensions are requested via -std=gnu*.
r~
[Prev in Thread] | Current Thread | [Next in Thread] |