Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!zaphod.mps.ohio-state.edu!wuarchive!udel!haven!adm!smoke!gwyn From: gwyn@smoke.brl.mil (Doug Gwyn) Newsgroups: comp.lang.c Subject: Re: is (int (*)())NULL legal when NULL is (void *)0? Message-ID: <14457@smoke.brl.mil> Date: 14 Nov 90 15:22:06 GMT References: <1391@gtx.com> Organization: U.S. Army Ballistic Research Laboratory, APG, MD. Lines: 9 In article <1391@gtx.com> randy@gtx.UUCP (Randy D. Miller) writes: -Can NULL always be cast to a function pointer, even in implementations -that legally define NULL as (void *)0? For example, are the following -lines legal? - /* example 1 */ int (*f1)(void) = NULL; - /* example 2 */ int (*f2)(void) = (int (*)(void))NULL; No, the second is not required to be supported by the implementation, but the first is (3.2.2.3).