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 17208 invoked from network); 2 Feb 2021 23:47:38 -0000 Received: from minnie.tuhs.org (45.79.103.53) by inbox.vuxu.org with ESMTPUTF8; 2 Feb 2021 23:47:38 -0000 Received: by minnie.tuhs.org (Postfix, from userid 112) id 3A4D19BBA8; Wed, 3 Feb 2021 09:47:37 +1000 (AEST) Received: from minnie.tuhs.org (localhost [127.0.0.1]) by minnie.tuhs.org (Postfix) with ESMTP id A56019BA40; Wed, 3 Feb 2021 09:47:08 +1000 (AEST) Received: by minnie.tuhs.org (Postfix, from userid 112) id 9C7EE9BA40; Wed, 3 Feb 2021 09:47:05 +1000 (AEST) Received: from mcvoy.com (mcvoy.com [192.169.23.250]) by minnie.tuhs.org (Postfix) with ESMTPS id D51AF9BA3F for ; Wed, 3 Feb 2021 09:47:04 +1000 (AEST) Received: by mcvoy.com (Postfix, from userid 3546) id E0E1235E344; Tue, 2 Feb 2021 15:47:03 -0800 (PST) Date: Tue, 2 Feb 2021 15:47:03 -0800 From: Larry McVoy To: The Unix Heritage Society mailing list Message-ID: <20210202234703.GH4227@mcvoy.com> References: <202009190151.08J1pYnb066792@tahoe.cs.dartmouth.edu> <202009201842.08KIgn2f022401@freefriends.org> <04211470-AD63-452A-A0BB-6A7A6FD85AAE@gmail.com> <202009202026.08KKQ2x6137303@tahoe.cs.dartmouth.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) 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: , Errors-To: tuhs-bounces@minnie.tuhs.org Sender: "TUHS" On Tue, Feb 02, 2021 at 03:08:42PM -0800, Greg A. Woods wrote: > At Sun, 20 Sep 2020 17:35:52 -0400, John Cowan wrote: > Subject: Re: [TUHS] reviving a bit of WWB > > > > When 0 is coerced implicitly or explicitly to a pointer type, it becomes a > > null pointer. That's true even on architectures where all-bits-zero is > > *not* a null pointer. However, in contexts where there is no expected > > type, as in a call to execl(), the null at the end of the args list has to > > be explicitly cast to (char *)0 or some other null pointer. > > Yeah, that's more to do with the good/bad choice in C to do or not do > integer promotion in various situations, and to default parameter types > to 'int' unless they are, or are cast to, a wider type I've dealt with this, here is a story of a super computer where native pointers pointed at bits but C pointers pointed at bytes and you can shake your head at the promotion problems: https://minnie.tuhs.org/pipermail/tuhs/2017-September/012050.html