Path: utzoo!mnetor!uunet!seismo!sundc!pitstop!sun!decwrl!megatest!djones From: djones@megatest.UUCP (Dave Jones) Newsgroups: comp.lang.c Subject: Re: Why NULL is 0 Message-ID: <432@goofy.megatest.UUCP> Date: 5 Apr 88 15:18:56 GMT References: <10229@steinmetz.steinmetz.ge.com> Organization: Megatest Corporation, San Jose, Ca Lines: 40 in article <10229@steinmetz.steinmetz.ge.com>, davidsen@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@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