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~

Reply via email to