Path: utzoo!utgpu!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!unmvax!ncar!ames!oliveb!3comvax!bridge2!auspex!guy
From: guy@auspex.UUCP (Guy Harris)
Newsgroups: comp.lang.c
Subject: Re: pointers, tests, casts
Message-ID: <582@auspex.UUCP>
Date: 5 Dec 88 17:22:16 GMT
References: <11130@dartvax.Dartmouth.EDU> <44100016@hcx3> <9038@smoke.BRL.MIL> <44803@yale-celray.yale.UUCP>
Reply-To: guy@auspex.UUCP (Guy Harris)
Organization: Auspex Systems, Santa Clara
Lines: 9


 >Isn't the latter [(void *)0] generally preferable, given its possible
 >use as a parameter for a function with no prototype in scope?  Further,
 >isn't the former dangerous in this case, given that there is no
 >guarantee for NULL and (int)0 to have the same representation?

There's no guarantee that "(void *)0" and "(type *)0" have the same
representation, either, unless "type" is either "char" or "void", as far
as I know, so "(void *)0" doesn't guarantee success, either.