Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site dciem.UUCP Path: utzoo!dciem!msb From: msb@dciem.UUCP (Mark Brader) Newsgroups: net.lang.c Subject: Re: ANSI C Message-ID: <1917@dciem.UUCP> Date: Fri, 15-Aug-86 12:34:43 EDT Article-I.D.: dciem.1917 Posted: Fri Aug 15 12:34:43 1986 Date-Received: Fri, 15-Aug-86 13:24:10 EDT References: <86900009@haddock> <6143@sun.uucp> Reply-To: msb@dciem.UUCP (Mark Brader) Organization: NTT Systems Inc., c/o DCIEM, Toronto Lines: 18 Summary: Somebody writes: > > In 3.2.2.3, "(void *)0" is called a null pointer constant, though 5.6.3.12 > > says the value of NULL is implementation-defined. I take this to mean that > > the internal representation of (void *)0 need not have all bits clear. Guy Harris (guy@sun.uucp) replies: > Yes. I'm certain there are many machines out there that either have C > implementations or should have them that have a representation for null > pointers that is not a bucket of zero bits. This is almost correct. It IS true that (void *)0 need not have all bits clear, but this is not what the reference in 5.6.3.12 is saying. What it is saying is that your implementation can #define NULL as either 0 or (void *)0. Mark Brader, dciem!msb #define MSB(type) (~(((unsigned type)-1)>>1))