From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 6436 invoked from network); 21 Sep 2020 20:47:02 -0000 Received: from minnie.tuhs.org (45.79.103.53) by inbox.vuxu.org with ESMTPUTF8; 21 Sep 2020 20:47:02 -0000 Received: by minnie.tuhs.org (Postfix, from userid 112) id 56DED9C8F7; Tue, 22 Sep 2020 06:46:59 +1000 (AEST) Received: from minnie.tuhs.org (localhost [127.0.0.1]) by minnie.tuhs.org (Postfix) with ESMTP id 72E0193D33; Tue, 22 Sep 2020 06:46:48 +1000 (AEST) Received: by minnie.tuhs.org (Postfix, from userid 112) id 221DE93D33; Tue, 22 Sep 2020 06:46:47 +1000 (AEST) Received: from sdaoden.eu (sdaoden.eu [217.144.132.164]) by minnie.tuhs.org (Postfix) with ESMTPS id 908DC93D06 for ; Tue, 22 Sep 2020 06:46:46 +1000 (AEST) Received: by sdaoden.eu (Postfix, from userid 1000) id A6C9616057; Mon, 21 Sep 2020 22:46:44 +0200 (CEST) Date: Mon, 21 Sep 2020 22:46:43 +0200 From: Steffen Nurpmeso To: Steve Nickolas Message-ID: <20200921204643.A2XD6%steffen@sdaoden.eu> In-Reply-To: References: <202009190151.08J1pYnb066792@tahoe.cs.dartmouth.edu> <202009201842.08KIgn2f022401@freefriends.org> <04211470-AD63-452A-A0BB-6A7A6FD85AAE@gmail.com> <202009202026.08KKQ2x6137303@tahoe.cs.dartmouth.edu> Mail-Followup-To: Steve Nickolas , Doug McIlroy , tuhs@tuhs.org User-Agent: s-nail v14.9.19 OpenPGP: id=EE19E1C1F2F7054F8D3954D8308964B51883A0DD; url=https://ftp.sdaoden.eu/steffen.asc; preference=signencrypt BlahBlahBlah: Any stupid boy can crush a beetle. But all the professors in the world can make no bugs. Subject: Re: [TUHS] reviving a bit of WWB X-BeenThere: tuhs@minnie.tuhs.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: The Unix Heritage Society mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: tuhs@tuhs.org, Doug McIlroy Errors-To: tuhs-bounces@minnie.tuhs.org Sender: "TUHS" Steve Nickolas wrote in : |On Sun, 20 Sep 2020, Doug McIlroy wrote: | |>> (Of course, that assumes NULL is 0, but I don't think I've run into any |>> architecture so braindead as to not have NULL=0.) |> |> It has nothing to do with machine architecture. The C standard |> says 0 coerces to the null pointer. NULL, defined in , |> is part of the library, not the language. I always use 0, |> because NULL is a frill. |> |> Doug | |I was under the impression that there was explicitly no requirement that a |null pointer be 0, and that there was at least one weird system where that |wasn't true - that it just so happened that null points to 0 on certain |CPUs and that 0=NULL *happens* to work on most CPUs but wasn't guaranteed. |(In fact, I read that my habit of using 0 for NULL relied on a faulty |assumption!) | |I mean, I've never actually used a CPU/OS/compiler where it wasn't true, |but... I remember having to use __null for __GNUC__>=3 because 0x0 (what is used for my NIL macro before, this was C++) did not work out well. (Could have been compiler bug, of course .. but i just remembered it when reading your post.) --steffen | |Der Kragenbaer, The moon bear, |der holt sich munter he cheerfully and one by one |einen nach dem anderen runter wa.ks himself off |(By Robert Gernhardt)