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 15019 invoked from network); 20 Sep 2020 20:59:24 -0000 Received: from minnie.tuhs.org (45.79.103.53) by inbox.vuxu.org with ESMTPUTF8; 20 Sep 2020 20:59:24 -0000 Received: by minnie.tuhs.org (Postfix, from userid 112) id 1CF989CF23; Mon, 21 Sep 2020 06:59:04 +1000 (AEST) Received: from minnie.tuhs.org (localhost [127.0.0.1]) by minnie.tuhs.org (Postfix) with ESMTP id D90BA9CB8B; Mon, 21 Sep 2020 06:58:54 +1000 (AEST) Received: by minnie.tuhs.org (Postfix, from userid 112) id 5EEFB93F5B; Mon, 21 Sep 2020 06:58:53 +1000 (AEST) Received: from minun.buric.co (minun.buric.co [51.15.8.196]) by minnie.tuhs.org (Postfix) with ESMTP id 388199CE4C for ; Mon, 21 Sep 2020 06:58:52 +1000 (AEST) Received: by minun.buric.co (Postfix, from userid 1000) id 2059735C0D2F; Sun, 20 Sep 2020 22:58:51 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by minun.buric.co (Postfix) with ESMTP id 15D6735C0C9A; Sun, 20 Sep 2020 16:58:51 -0400 (EDT) Date: Sun, 20 Sep 2020 16:58:51 -0400 (EDT) From: Steve Nickolas X-X-Sender: mary@sd-119843.dedibox.fr To: Doug McIlroy In-Reply-To: <202009202026.08KKQ2x6137303@tahoe.cs.dartmouth.edu> Message-ID: References: <202009190151.08J1pYnb066792@tahoe.cs.dartmouth.edu> <202009201842.08KIgn2f022401@freefriends.org> <04211470-AD63-452A-A0BB-6A7A6FD85AAE@gmail.com> <202009202026.08KKQ2x6137303@tahoe.cs.dartmouth.edu> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed 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 Errors-To: tuhs-bounces@minnie.tuhs.org Sender: "TUHS" 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... -uso.