use of NULL

Doug Gwyn gwyn at smoke.BRL.MIL
Fri Feb 24 05:51:46 AEST 1989


In article <20928 at shemp.CS.UCLA.EDU> heather at SEAS.UCLA.EDU (Heather Burris) writes:
>Why doesn't the C standard treat NULL or 0 (a static/constant NULL or 0,
>i.e. indicated at compile time) passed to a function that has a pointer
>value in the function prototype as a special case and do the cast implicitly?

It does (actually it's not a special case), but most existing C code
does not use prototypes, in which case the programmer has to explicitly
cast the NULL argument to the proper type.



More information about the Comp.lang.c mailing list