Deutsch   English   Français   Italiano  
<86h69fxozf.fsf@linuxsc.com>

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

Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Tim Rentsch <tr.17687@z991.linuxsc.com>
Newsgroups: comp.lang.c
Subject: Re: sizeof struct with flexible array: when did it change?
Date: Sun, 13 Oct 2024 21:55:32 -0700
Organization: A noiseless patient Spider
Lines: 20
Message-ID: <86h69fxozf.fsf@linuxsc.com>
References: <20241006192337.76@kylheku.com> <ve19g1$1orao$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Injection-Date: Mon, 14 Oct 2024 06:55:33 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="e06779884ea3dbf67bd7b93727715ea0";
	logging-data="1096577"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX19MNnOWo6VFHvEiQ7MjBflAF3UvY++ckm4="
User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux)
Cancel-Lock: sha1:NOefDBrU7E/J7z//gAoZK+/CMc8=
	sha1:nyu9gPYgI22aehd3ztX2FhORyZo=
Bytes: 1857

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".