Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!cs.utexas.edu!swrinde!elroy.jpl.nasa.gov!ncar!news.miami.edu!umiami!bxpfac From: bxpfac@umiami.ir.miami.edu Newsgroups: comp.lang.c Subject: Is there a NULL pointer to functions? Message-ID: <1991May24.090932.10158@umiami.ir.miami.edu> Date: 24 May 91 13:09:32 GMT Reply-To: devebw9f@miavax.ir.miami.edu Organization: Univ of Miami IR Lines: 22 I am not sure if this go posted the first time. Second try! As the subject heading says, is there a NULL pointer to functions? The program shown below when compiled with gcc generated the following message: In function foo: warning: ANSI C forbids comparison of `void *' with function pointer /*-- Program --*/ #define NULL ((void *) 0) void foo (void (*fun) (void)) { if (fun != NULL) /* Line with the warning. */ fun (); } Thanks for any suggestions to fix this. Bimal / devebw9f@miavax.ir.miami.edu