Path: csiph.com!news.mixmin.net!eternal-september.org!news.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: Tue, 02 May 2023 06:22:50 -0700 Organization: A noiseless patient Spider Lines: 23 Message-ID: <86r0ry27h1.fsf@linuxsc.com> References: <87zg7n89zw.fsf@bsb.me.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: dont-email.me; posting-host="a5ed23c0072bcec5fb0daec640c9c411"; logging-data="820280"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19Y2h8zfCDQi41mRXhb8T4Sk2NRGTVAovA=" User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux) Cancel-Lock: sha1:IZMbOhp01lUQ/xWPj2KsxWXLRXs= sha1:LKlnvY4cfR7Ol5yflEEuDFLqaD8= Xref: csiph.com comp.lang.c:170164 Ben Bacarisse writes: [context] >> "Catch-23: The New C Standard,Sets the World on Fire" >> https://queue.acm.org/detail.cfm?id=3588242 > I agree with the authors that the change declaring realloc(..., 0) > to be undefined is worrying, but I can't follow their reasoning > about the history. They suggest something had already happened in > C17 that set C on a course towards this "breaking change" but I > can't find what they refer to. After reviewing the paper again, and also consulting the C17 draft (n2176), I believe they meant to refer to this item, in section 7.31.12, paragraph 2: Invoking realloc with a size argument equal to zero is an obsolescent feature. The change to being obsolescent is mentioned in the paper, along with a reference to the n2176 draft, in the last sentence of the second to last paragraph before the "Muddling Through" section.