Path: utzoo!attcan!uunet!cs.utexas.edu!usc!snorkelwacker!bloom-beacon!daemon From: scs@adam.mit.edu (Steve Summit) Newsgroups: comp.lang.c Subject: Re: I'm confused (Re: What C compilers have non-zero null pointers?) Message-ID: <1990Jul23.122612.20886@athena.mit.edu> Date: 23 Jul 90 12:26:12 GMT References: <30820@eerie.acsu.Buffalo.EDU> <9007201132.AA06954@edison.CHO.GE.COM> Sender: daemon@athena.mit.edu (Mr Background) Reply-To: scs@adam.mit.edu (Steve Summit) Organization: Thermal Technologies, Inc. Lines: 19 In article <9007201132.AA06954@edison.CHO.GE.COM> rja writes: >It is true without doubt that both K&R and ANS X3.159 C >both guarantee that comparing a pointer to "0" is the >same as comparing a pointer to "NULL." >It is also something that is broken on several widely >used C compilers for the Intel segmented architecture. It wouldn't hurt if you named names. The existence of such broken compilers is one of the reasons that null pointer confusion never ends. A compiler that doesn't properly treat "0" as a source-code null pointer is truly broken, and its vendor couldn't complain about libel or slander if that fact were mentioned here. (If the compiler in question is in fact not broken, or if it has been fixed in a later version, it would be nice to get the word out to those who had believed it was broken so they can stop being duplicitous about NULL, either.) Steve Summit scs@adam.mit.edu