Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site teltone.UUCP Path: utzoo!watmath!clyde!floyd!vax135!cornell!uw-beaver!teltone!joe From: joe@teltone.UUCP (Joe) Newsgroups: net.lang.c Subject: Assignment to pointers to functions returning void Message-ID: <245@teltone.UUCP> Date: Fri, 2-Mar-84 13:54:01 EST Article-I.D.: teltone.245 Posted: Fri Mar 2 13:54:01 1984 Date-Received: Sat, 3-Mar-84 23:36:27 EST Organization: Teltone Corp., Kirkland, WA Lines: 27 This may not be news to you but it was news to me. The 4.1 BSD C complier barfs when an attempt is made to assign the address of a function returning void to a variable declared as a pointer to a function returning void. Example code can be found below. Can I say that the compilier voids on voids or should I send this line to net.jokes. Enjoy. Joe Brady ..!uw-beaver!teltone!joe. ================================================================== /* Program demonstrates a bug in the VAX 4.1 BSD C compilier. * The following error messages is printed: * "junk.c", line 17: operands of = have incompatible types */ short f0(); void f1(); int f2(); main() { short (*pf0)(); void (*pf1)(); int (*pf2)(); pf0 = f0; pf1 = f1; /* This is line 17 */ pf2 = f2; }