Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!mit-eddie!bloom-beacon!primerd!ENI!RELAY!ARIEL From: ARIEL@RELAY.Prime.COM Newsgroups: comp.lang.c Subject: Re: What C compilers have non-zero null Message-ID: <108300010@RELAY.Prime.COM> Date: 12 Jul 90 20:17:00 GMT References: <422@minya.UUCP> Lines: 21 Nf-ID: #R:minya.UUCP:-42200:RELAY:108300010:000:590 Nf-From: RELAY.Prime.COM!ARIEL Jul 12 20:17:00 1990 A small clarification re "certain Prime computers": The Prime 50 Series does use a non-zero representation for NULL in some languages, particularily PL/I. The C NULL is all 0-bits. Sometimes (in IX mode) 32 of them, other times (V mode, on older machines) 48 bits. If i is an int, and p is a pointer, then (in IX mode): i = (int)p; p = (void *)i; changes the bit pattern. (i.e after these two statements *(int *)&i != *(int *)&p is true if p != NULL) The change is invertable (p ends up with the same value) IF p is actually a valid pointer (including NULL of course) Robert Ullmann