Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!cmcl2!brl-adm!adm!Leisner.Henr@Xerox.COM From: Leisner.Henr@Xerox.COM (Marty) Newsgroups: comp.lang.c Subject: NULL function pointers Message-ID: <9268@brl-adm.ARPA> Date: Mon, 14-Sep-87 10:58:22 EDT Article-I.D.: brl-adm.9268 Posted: Mon Sep 14 10:58:22 1987 Date-Received: Tue, 15-Sep-87 04:52:31 EDT Sender: news@brl-adm.ARPA Lines: 20 K&R guarantees pointers to valid data objects are non-NULL. But what about function pointers? I found no reference to guarantees to non-NULL function pointers and a number of compiler system/linkers I've seen have no problem inserting C functions at address 0. It seems like a good idea not to have a valid function at address NULL so it is easy to test a function pointer for validity. On MS-Dos, for instance, a signal handler at the top of your program (address 0) will often cause problems for signal() (at least with aztec C). marty GV: leisner.henr NS: martin leisner:henr801c:xerox UUCP: martyl@rocksvax.uucp