Why NULL is 0

Dave Jones djones at megatest.UUCP
Wed Apr 6 01:18:56 AEST 1988


in article <10229 at steinmetz.steinmetz.ge.com>, davidsen at steinmetz.steinmetz.ge.com (William E. Davidsen Jr) says:
> 
> There has been a great deal of misunderstanding of the use of zero and
> pointers. It seems clear in K&R and practice that assignment of a zero
> to a pointer produces a NULL pointer of the appropriate type. What is
> incorrectly assumed is that zero *is* a NULL pointer.
> 

... [ Lot's of good, true, stuff about pointers etc. ]

> There are many programs which "have worked for years" which are not
  ^^^^^ ^^^ ^^^^ ^^^^^^^^ ^^^^^  ^^^^ ^^^^^^ ^^^ ^^^^^  ^^^^^ ^^^ ^^^
> portable, because of this lack of typing on arguments. Most of these run
  ^^^^^^^^
> on any machine which has the size of int equal sizeof pointer, and all
> pointers are the same in content. This includes the VAX and 68000
> family. Other machines, such as some Data General models, Cray, small
> Intel processors, SPARC, and some non-UNIX C compilers on any machine
		    ^^^^^
> will not accept this lack of explicit typing.
> -- 
> 	bill davidsen		(wedu at ge-crd.arpa)
>   {uunet | philabs | seismo}!steinmetz!crdos1!davidsen
> "Stupidity, like virtue, is its own reward" -me


SPARC?  Really?  REALLY??   What have they done?  Please clarify.

This is news to me.  I was naively assuming that since the current
class of Sun workstations is MC68020, they would attempt to be sure
that 68000 C programs would be portable to SPARC. (Even non-portable ones
which "have worked for years.")

I'm stunned.  Really.  REALLY!!  Stunned.

Please tell me this was just an April Fool's joke that got here a
little late.


		Dave (int*) Jones



More information about the Comp.lang.c mailing list