Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!rutgers!ames!amdcad!sun!guy From: guy@sun.uucp (Guy Harris) Newsgroups: comp.lang.c Subject: Re: how do I initialize a function pointer to be NULL ? Message-ID: <27825@sun.uucp> Date: Sat, 12-Sep-87 21:09:54 EDT Article-I.D.: sun.27825 Posted: Sat Sep 12 21:09:54 1987 Date-Received: Sun, 13-Sep-87 10:47:50 EDT References: <197@tiger.Princeton.EDU> <27742@sun.uucp> <2236@emory.uucp> Organization: Sun Microsystems, Inc. - Mtn View, CA Lines: 14 Keywords: NULLFUNC > Actually, depending on the model (the IBM machines have a segmented > addressing scheme), NULL is defined as 0 if the memory is in small or > medium models, and is defined as 0L in compact and large models. > Since a module may need to be compiled several ways, The model in which the module is compiled is *completely irrelevant* in this case, unless the compiler is broken. The compiler is required to coerce 0 (yes, a 16-bit 0) into a large-model function pointer in a context where this is called for by the language specification; an initialization counts as such a context. -- Guy Harris {ihnp4, decvax, seismo, decwrl, ...}!sun!guy guy@sun.com (or guy@sun.arpa)