Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!rutgers!ames!oliveb!sun!gorodish!guy From: guy%gorodish@Sun.COM (Guy Harris) Newsgroups: comp.lang.c Subject: Re: Query: Implementation with non-zero NULL Message-ID: <20028@sun.uucp> Date: Fri, 29-May-87 14:01:30 EDT Article-I.D.: sun.20028 Posted: Fri May 29 14:01:30 1987 Date-Received: Sun, 31-May-87 07:46:39 EDT References: <158@delftcc.UUCP> Sender: news@sun.uucp Lines: 28 Keywords: C, NULL, portability > I'm writing a book on C portability. Interested to find actual > implementation of C where the null pointer is not "all bits zero." Try looking for a machine with lots of instruction-set features for type checking *et al*; such a machine might have some special format for a null pointer. > (List of questions about the implementation) One hopes that the implementation will do the "right thing" in all those cases. This does not guarantee that there is not an implementation that does the wrong thing, it just means that if there is such an implementation, it has bugs in it and should be fixed, and that the implementer has no leg to stand on if they want to defend the implementation. *I* certainly don't intend to alter my code on the off chance that somebody who didn't understand C did the implementation; were I to come across such an implementation, I would inform them that their implementation was broken. BTW, char *p; p = 0; will also result in assigning a null pointer to "p" on a correct implementation. Guy Harris {ihnp4, decvax, seismo, decwrl, ...}!sun!guy guy@sun.com