Path: csiph.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail From: Tim Rentsch Newsgroups: comp.lang.c Subject: Re: AVL tree insertion - programming exercise Date: Wed, 14 Oct 2026 10:39:56 -0700 Organization: A noiseless patient Spider Lines: 34 Message-ID: <86ik34gp03.fsf@linuxsc.com> References: <86ece2kppv.fsf@linuxsc.com> <11al4mu$fqtl$1@kst.eternal-september.org> <11ali2e$pi$1@reader2.panix.com> <86v775h9o2.fsf@linuxsc.com> <11am74c$54g$1@reader2.panix.com> <11amvh2$14pou$3@kst.eternal-september.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Date: Wed, 14 Oct 2026 17:39:57 +0000 (UTC) Injection-Info: dont-email.me; logging-data="1793303"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX189H+NLPDMWOorkOV7CjdQjwLOX4zIcFj0="; posting-host="078471281e80925fad2f4c2182845b5c" User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux) Cancel-Lock: sha1:pTwuLodrDoI+Eew9zstffIxc4pY= sha1:BcCT8DswvlJNQBFnnorN2y9Y/IY= sha256:0Bf3rG3jNTvuiyPP2RcN44e8iR6Z/spYpcjgWI94RGs= sha1:lhxTQxP0gX+H4i23LjDk3id6saQ= sha256:QCjmyCbMq2DN3QKxADivrPUzhNV/pusYZzampQfpjlY= Xref: csiph.com comp.lang.c:403158 Keith Thompson writes: > cross@spitfire.i.gajendra.net (Dan Cross) writes: > >> In article <86v775h9o2.fsf@linuxsc.com>, >> Tim Rentsch wrote: >> >>> cross@spitfire.i.gajendra.net (Dan Cross) writes: > > [...] > >>>> I don't think this is true anymore, as of C23. Here's the >>>> relevant text from n3220, sec 7.24.3, describing the return >>>> value from `malloc` et al: >>>> >>>> |The pointer returned if the allocation succeeds is suitably >>>> |aligned so that it may be assigned to a pointer to any type of >>>> |object with a fundamental alignment requirement and size less >>>> |than or equal to the size requested. >>>> >>>> This sentence is somewhat ambiguous because it's unclear whether >>>> the "less than or equal to the size requested" criteria applies >>>> to both the pointer type's size _and_ fundamental alignment >>>> requirement, or _just_ the size, [...] >>> >>> It's poorly constructed but in English it has only one >>> grammatical parse. >> >> Nope. Not even close. > > I think Tim is right about there being only one grammatical parse. > [...] Thanks Keith! I owe you one. :)