Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/5/84; site reed.UUCP Path: utzoo!watmath!clyde!burl!ulysses!mhuxr!mhuxt!houxm!vax135!cornell!uw-beaver!tektronix!reed!alexis From: alexis@reed.UUCP (Alexis Dimitriadis) Newsgroups: net.lang.c Subject: Re: NULL ROUTINE POINTERS Message-ID: <2217@reed.UUCP> Date: Mon, 2-Dec-85 03:10:33 EST Article-I.D.: reed.2217 Posted: Mon Dec 2 03:10:33 1985 Date-Received: Tue, 3-Dec-85 20:17:43 EST References: <139@brl-tgr.ARPA> Reply-To: alexis@reed.UUCP (Alexis Dimitriadis) Organization: Reed College, Portland, Oregon Lines: 22 Summary: > 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