gcc and NULL function pointers.
Chuck Karish
karish at mindcraft.com
Sat Jun 29 08:43:44 AEST 1991
In article <20969 at crdgw1.crd.ge.com> volpe at camelback.crd.ge.com
(Christopher R Volpe) writes:
>I believe the following is true:
>
>(1) The following code is strictly conforming:
> struct foo *fooptr = NULL;
>
>(2) The following code requires a diagnostic:
> struct foo *fooptr = (char *)0;
Is there a restriction that would prevent the implementation
from producing a diagnostic for (1)? I wouldn't be surprised
to see either "possible pointer type mismatch" or "illegal
combination of pointer and integer", depending on how NULL is
defined.
--
Chuck Karish karish at mindcraft.com
Mindcraft, Inc. (415) 323-9000
More information about the Comp.std.c
mailing list