Deutsch   English   Français   Italiano  
<20250410200202.357@kylheku.com>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail
From: Kaz Kylheku <643-408-1753@kylheku.com>
Newsgroups: comp.lang.c
Subject: Re: sizeof struct with flexible array: when did it change?
Date: Fri, 11 Apr 2025 03:04:31 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 19
Message-ID: <20250410200202.357@kylheku.com>
References: <20241006192337.76@kylheku.com>
Injection-Date: Fri, 11 Apr 2025 05:04:31 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="83c4f9938a9c8a0ea420cd848f641865";
	logging-data="470968"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX1/g31GHnER3xf/AaUWY3wcLtytKJpzGzK0="
User-Agent: slrn/pre1.0.4-9 (Linux)
Cancel-Lock: sha1:R4HAspdy2Qe7xGPmr6cxi1rghHM=

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/txr
Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal
Mastodon: @Kazinator@mstdn.ca