int (*f)(void) = 0; int (*f)(void) = (void *) 0;

Earl Chew cechew at sol1.cs.monash.edu.au
Wed Feb 27 08:39:38 AEST 1991


The standard states that 0 and (void *) 0 are `null pointers'. Does this mean
that they are equivalent in all contexts? Specifically:

int (*f)(void) = 0;

My understanding is that this is permissible.

int (*f)(void) = (void *) 0;

I am unsure whether this is permissible.

Earl
--
Earl Chew, Dept of Computer Science, Monash University, Australia 3168
EMAIL: cechew at bruce.cs.monash.edu.au PHONE: 03 5655778 FAX: 03 5655146
----------------------------------------------------------------------



More information about the Comp.std.c mailing list