The macro NULL in ISO C99 standard is defined as follows:
The macros are
NULL
which expands to an implementation-defined null pointer constant; and.....
That is:
#define NULL ((void *)0)
This means that a pointer of void could be assigned to any kind of pointer (confering to it the address 0), but not to any kind of data that is not a pointer.
Probably the compiler you are using is not fully C99 compliant, infact in old style NULL is defined simply as zero.
Anyway for easy code reading can I suggest to define your own null without type spec. I.e.:
#define NULL_VALUE 0
P.S.: Is still perfectly correct to initialize a pointer with 0 (it's compiler responsability to convert it to a null pointer of the correct type) while the type of variable (pointer) is defined in the scope. i.e.:
char *p = 0;
FILE *fp;
if ((fp=fopen("foo.foo","r")) == 0) ....
Is not valid when the compiler could not understand if the variable is a pointer (i.e. passing parameters to a function with no prototype).
See also
http://www.eskimo.com/~scs/C-faq/s5.html