NULL pointer
Ron Natalie <ron>
ron at brl-sem.ARPA
Mon Nov 18 07:29:30 AEST 1985
>
> Many of these problems would not exist today if the original definition of
> NULL had been:
>
> #define NULL ((char *) 0)
>
Personally, I never use NULL. NULL is a misnomer. Zero is defined
to be the invalid pointer, zero should be used.
But we've been through this before. Assigning a type to NULL opens
up as many problems as it solves. There are a class of machines where
byte pointers themselves are different than pointers to any other type.
If you are going to assing a type to NULL you probably ought to use
(void *).
=Ron
More information about the Comp.lang.c
mailing list