Sujet : Re: sizeof struct with flexible array: when did it change?
De : 643-408-1753 (at) *nospam* kylheku.com (Kaz Kylheku)
Groupes : comp.lang.cDate : 11. Apr 2025, 04:04:31
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <20250410200202.357@kylheku.com>
References : 1
User-Agent : slrn/pre1.0.4-9 (Linux)
On 2024-10-07, Kaz Kylheku <
643-408-1753@kylheku.com> wrote:
C99 said that the size of a structure that ends in a flexible array
member is the same as the offset of that flexible member in a
similar structure in which the array has some unspecified size.
>
The latest draft says that the size is calculated as if the flexible
array member were omitted, except that there may be more padding than
the omission would imply.
I just noticed that a draft version of C99 has exactly this
same wording!
In other words, C99 changed it prior to publication, and then it was
backpedaled to the C99 draft text, and that remains current.
-- TXR Programming Language: http://nongnu.org/txrCygnal: Cygwin Native Application Library: http://kylheku.com/cygnalMastodon: @Kazinator@mstdn.ca