Sujet : Re: sizeof struct with flexible array: when did it change?
De : tr.17687 (at) *nospam* z991.linuxsc.com (Tim Rentsch)
Groupes : comp.lang.cDate : 14. Oct 2024, 05:55:32
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <86h69fxozf.fsf@linuxsc.com>
References : 1 2
User-Agent : Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux)
Nick Bowler <
nbowler@draconx.ca> writes:
On Mon, 7 Oct 2024 02:32:13 -0000 (UTC), Kaz Kylheku wrote:
>
I can't think of a reasonable interpretation of the original
wording which would allow the size to be other than the offset
of the array, when the array is of a character type.
>
The current wording clearly does allow the size to go beyond
the offset in that case.
>
The original wording includes no requirement that the offset of
the replacement array used for the size calculation has any
relationship whatsoever with the offset of the flexible array
member.
The original wording is moot because it was superseded by the TC.
The purpose of a TC is not to change the language but to clarify
what semantics are intended. The point of the revised wording in
the TC is to say "this is what the earlier wording meant".