🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.c
Article #451

Re: AVL tree insertion - programming exercise

#451
From: Keith Thompson
Date: Fri, 16 Oct 2026 18:27
28 lines
2416 bytes
cross@spitfire.i.gajendra.net (Dan Cross) writes:
[...]
> A couple of minor quibbles: it bears mentioning that valid
> alignments are positive powers of two.

And that wasn't explicitly stated until C11.  C99 talks about
alignment, but is a bit vagee about it.  A hypothetical conforming
C99 implementation might have had addresses organized in powers of
3, for example.  I doubt that any such implementation ever existed.

Even in C23, the definition of "alignment" is vague:

    alignment

    requirement that objects of a particular type be located on
    storage boundaries with addresses that are particular multiples
    of a byte (3.7) address

The meaning is obvious given a typical memory model, but I don't
know how you'd define "multiples of a byte address" in standardese.
I'm not even sure it's correctly stated.

In practice, I don't think this vagueness has been a problem;
everybody knows what it's *supposed* to mean.

-- 
Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
void Void(void) { Void(); } /* The recursive call of the void */
Technical Details
Message-ID: <11atqas$3hfie$1@kst.eternal-september.org>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!kst.eternal-september.org!.POSTED!not-for-mail
References: <86ece2kppv.fsf@linuxsc.com> <11arlj9$2q39c$1@kst.eternal-september.org> <11as4h9$7ht$1@reader2.panix.com> <11as9gl$2vtou$1@kst.eternal-september.org> <11at1nj$rtn$1@reader2.panix.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!kst.eternal-september.org!.POSTED!not-for-mail
From: Keith Thompson <Keith.S.Thompson+u@gmail.com>
Newsgroups: comp.lang.c
Subject: Re: AVL tree insertion - programming exercise
Date: Fri, 16 Oct 2026 11:27:40 -0700
Organization: None to speak of
Lines: 28
Message-ID: <11atqas$3hfie$1@kst.eternal-september.org>
References: <86ece2kppv.fsf@linuxsc.com>
	<11arlj9$2q39c$1@kst.eternal-september.org>
	<11as4h9$7ht$1@reader2.panix.com>
	<11as9gl$2vtou$1@kst.eternal-september.org>
	<11at1nj$rtn$1@reader2.panix.com>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Date: Fri, 16 Oct 2026 18:27:41 +0000 (UTC)
Injection-Info: kst.eternal-september.org;
	logging-data="3718734"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX18L+OmIql9gXBHyAvmeQJJI"; posting-host="cf7ed1e612447f7784dc01a34361c57c"
User-Agent: Gnus/5.13 (Gnus v5.13)
Cancel-Lock: sha1:zDVsITG2Z+wBRb/FiEBxphqlHQw= sha256:i1QrfhAFepr7BDthLOGrnYl3g/+cazHHL4ZYiXFlJ8E=
	sha1:i+5tC/J2887FxqZFOdooaIFBVxA= sha256:OY9QA71t0RKdFjBz+M2+lf7wNQCgBsFH0Z6sr/N4Xi8=