NULL ROUTINE POINTERS
Alexis Dimitriadis
alexis at reed.UUCP
Mon Dec 2 18:10:33 AEST 1985
> After all the talk about null object pointers on machines with non-zero
> null addresses, how would you portably define a null routine pointer?:
Remember cdecl?? It says:
-----------
% cdecl
cast NULL into pointer to function returning short
(short (*)())NULL
-----------
so:
#define NULLROUTINE ((short (*)()) 0 )
will do fine. Remember, NULL _is_ 0, even on machines where (byte
pattern) zero is a valid address!!
Alexis Dimitriadis
--
_______________________________________________
Any opinions expressed above have been grown organically and contain
no preservatives or artificial sweeteners.
alexis @ reed
{decvax,ihnp4,ucbcad,uw-beaver}!tektronix!reed.UUCP
More information about the Comp.lang.c
mailing list