Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!henry From: henry@utzoo.UUCP (Henry Spencer) Newsgroups: net.lang.c Subject: Re: RE: if(p) Message-ID: <6070@utzoo.UUCP> Date: Wed, 23-Oct-85 13:19:43 EDT Article-I.D.: utzoo.6070 Posted: Wed Oct 23 13:19:43 1985 Date-Received: Wed, 23-Oct-85 13:19:43 EDT References: <1671@brl-tgr.UUCP> <30000017@ISM780.UUCP> <292@graffiti.UUCP> <2902@sun.uucp>, <334@graffiti.UUCP> Organization: U of Toronto Zoology Lines: 16 > Question: isn't this all rather moot? I mean, what sort of architecture could > you actually run 'C' on that doesn't allow the use of zero as a null pointer? > If nothing else you can always add a shim at 0000:0000 (or whatever weird > method you use for indicating segments)... Shame on you Peter, for not reading the entire net.lang.c archives before asking this question :-). Some while ago this very issue was raised: some poor people were faced with implementing C on an architecture which did interesting things with the high-order bits of pointers, such that any attempt to treat an all-0 value as a pointer caused a trap. Not just any attempt to follow the pointer, mind you, but any attempt to do *anything* with it. Trapping *NULL is one thing; trapping foo=NULL is unacceptable. So they could not use all-0 as NULL. -- Henry Spencer @ U of Toronto Zoology {allegra,ihnp4,linus,decvax}!utzoo!henry