Path: csiph.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail From: Keith Thompson Newsgroups: comp.lang.c Subject: Re: Small challenge: sort names Date: Thu, 09 Apr 2026 02:19:22 -0700 Organization: None to speak of Lines: 23 Message-ID: <87cy0832zp.fsf@example.invalid> References: <10r4h6o$396qn$1@dont-email.me> <10r537m$in2o$4@dont-email.me> <10r5vh2$3mo17$2@dont-email.me> <10r64uq$3pf3r$1@dont-email.me> <20260409001030.000006c9@yahoo.com> <86h5pkww9a.fsf@linuxsc.com> MIME-Version: 1.0 Content-Type: text/plain Injection-Date: Thu, 09 Apr 2026 09:19:23 +0000 (UTC) Injection-Info: dont-email.me; posting-host="6b48ea06657f6a2bb28c4f91cb64d10b"; logging-data="230413"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+jCHivU8LG5AZX+bi7XUL7" User-Agent: Gnus/5.13 (Gnus v5.13) Cancel-Lock: sha1:eA85TOpSbZCUlXv0VfHe0NUDzdE= sha1:9JCO320/9irRvCZ5uUp2jgDaBQ4= Xref: csiph.com comp.lang.c:397446 Tim Rentsch writes: [...] > The semantics of !ptr has been codified to mean 1 for null pointers > since the original C standard. Heck, even during the 1970s when C > allowed assigning integers directly to pointers, K&R said that > assigning 0 to a pointer produces a pointer guaranteed to be > different than a pointer to any object. Any C implementation where > !ptr does the wrong thing should be avoided like the plague. Any C implementation where !ptr does the wrong thing almost certainly does not exist. It's difficult to imagine that a C compiler with such a fundamental bug would ever go out the door. It's barely possible that compiler that uses a representation other than all-bits-zero for null pointers might have such a bug, but (a) anyone creating such an implementation will almost certainly be extremely careful to get such things right, and (b) I'm not sure that any such compilers even exist, except perhaps for old systems that would be considered exotic today. -- Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com void Void(void) { Void(); } /* The recursive call of the void */