Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site h-sc1.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!think!harvard!h-sc1!clarke From: clarke@h-sc1.UUCP (cam clarke) Newsgroups: net.lang.c Subject: pointers to void functions Message-ID: <943@h-sc1.UUCP> Date: Fri, 14-Feb-86 15:43:55 EST Article-I.D.: h-sc1.943 Posted: Fri Feb 14 15:43:55 1986 Date-Received: Sun, 16-Feb-86 05:55:40 EST Distribution: net Organization: Harvard Univ. Science Center Lines: 25 I wrote this piece of code to experiment with catching signals under 4.2 BSD Unfortunately, cc and lint don't like the assignment "tch = catch;" I can't figure out why, but when I change catch to be an int function and change tch to point to an int function, my problem disappears. Anyone know why? #include typedef void (*PFV)(); void catch() { printf("Signal Number 2 caught\n"); } main() { PFV tch; tch = catch; (void) signal (2,catch); while(1) ; } -Cam Clarke clarke@h-sc4.HARVARD.EDU clarke@h-sc4.UUCP