NULL pointer
Henry Spencer
henry at utzoo.UUCP
Thu Nov 21 05:51:18 AEST 1985
> But..... for a machine with non-zero null pointer representations
> > lo_func( ..., (int *)NULL, ... );
> still doesn't work. What the callee routine gets is a pointer with an all-zero
> representation.... which isn't a null pointer. The ONLY thing that does work is
> lo_func( ..., p=0, ....);
> where p is a pointer of the requisite type!...
Where on Earth did you get that idea? (Actually, I know: from an obsolete
writeup and/or compiler.) The semantics of casts were somewhat obscure when
they were first introduced, but the eventual rigorous definition was "a cast
acts just like an assignment to a variable of that type".
--
Henry Spencer @ U of Toronto Zoology
{allegra,ihnp4,linus,decvax}!utzoo!henry
More information about the Comp.lang.c
mailing list