%p and different pointer representations
M.T.Russell
mtr at ukc.ac.uk
Tue Feb 28 23:42:08 AEST 1989
In article <9730 at smoke.BRL.MIL> gwyn at brl.arpa (Doug Gwyn) writes:
>A function pointer may well not fit into a void*.
This presumably implies that comparison and assignment between function
pointers and void* pointers is illegal, and thus that
f = NULL;
and
if (f == NULL)
are both illegal if f is a function pointer and NULL is defined as (void *)0.
If this is so, then I don't see that (void *)0 is a reasonable definition
of NULL.
Is (void *)0 a special case? Gcc 1.32 -ansi -pedantic doesn't think so -
it objects to the above constructs.
Mark Russell
mtr at ukc.ac.uk
More information about the Comp.lang.c
mailing list