Path: utzoo!utgpu!watmath!clyde!att!rutgers!ucsd!sdcsvax!ucsdhub!esosun!seismo!uunet!auspex!guy
From: guy@auspex.UUCP (Guy Harris)
Newsgroups: comp.lang.c
Subject: Re: pointers, tests, casts
Message-ID: <559@auspex.UUCP>
Date: 2 Dec 88 09:02:55 GMT
References: <11130@dartvax.Dartmouth.EDU> <8961@smoke.BRL.MIL> <12690@steinmetz.ge.com> <226@twwells.uucp>
Reply-To: guy@auspex.UUCP (Guy Harris)
Organization: Auspex Systems, Santa Clara
Lines: 17

>Otherwise, there are are implementations, those defining NULL as
>(char *)0, which will give an error on the latter statement.

Great!  That means that if I get an error, I get to throw rotten eggs at
the implementor.  It's a good test to see who understood what they were
doing when they implemented C.... 

If NULL is properly defined as specified by the dpANS, namely as 0 or
"(void *)0",

	if (ptr == 0)

and

	if (ptr == NULL)

are equivalent.