Path: csiph.com!weretis.net!feeder8.news.weretis.net!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail
From: Tim Rentsch
Newsgroups: comp.lang.c
Subject: Re: "Catch-23: The New C Standard,Sets the World on Fire" by Terence Kelly with Special Guest Borer Yekai Pan
Date: Wed, 05 Apr 2023 09:20:22 -0700
Organization: A noiseless patient Spider
Lines: 32
Message-ID: <86lej65mih.fsf@linuxsc.com>
References: <87zg7n89zw.fsf@bsb.me.uk> <44v8ib15yl.fsf@be-well.ilk.org> <87sfdf6ooe.fsf@bsb.me.uk>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Injection-Info: dont-email.me; posting-host="3e40893fec19eeb2f5d61a30b72606e6"; logging-data="4160014"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+vSIlarUs3ejoXFGYeI4w3xozH2Q50xQA="
User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux)
Cancel-Lock: sha1:ZTn+utXparIDM3VcHBsFfO4YoKg= sha1:E2gJHbItsU7TDeBX2m+9ilNdXow=
Xref: csiph.com comp.lang.c:169834
Ben Bacarisse writes:
> Lowell Gilbert writes:
[earlier context]
>>>>>> "Catch-23: The New C Standard,Sets the World on Fire"
>>>>>> https://queue.acm.org/detail.cfm?id=3588242
>>>>>> [snip]
>>>>>
>> I think they're saying that before C17, realloc to a size of zero
>> was implementation defined, and that C17 changed that to it being
>> undefined. That isn't quite right, because it was
>> implementation-defined both before and after. But (I think; I
>> don't have a full copy of C17 at hand) the limitations were
>> changed, and realloc to a size of zero was explicitly described as
>> obsolescent. Unless I'm mistaken factually (possible, as I
>> mentioned) I think it's reasonable to consider C17 to be moving
>> towards disallowing the behaviour.
>
> I only have a draft of C17. The fact that C standards cost a lot of
> money is a valid point. I can't justify paying anything just to be
> able to chat on comp.lang.c about some finer points.
>
> The draft I have suggests that C17 just codified what implementation
> currently do: [...]
I think you can find the C17 information you're looking for by
looking at these two documents:
https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2464.pdf
https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2438.htm