Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site wucs.UUCP Path: utzoo!watmath!clyde!floyd!harpo!ihnp4!afinitc!wuphys!wucs!eric From: eric@wucs.UUCP Newsgroups: net.lang.c Subject: Re: Solution to "A C Puzzle" of 12/12/83 Message-ID: <150@wucs.UUCP> Date: Wed, 21-Mar-84 20:32:07 EST Article-I.D.: wucs.150 Posted: Wed Mar 21 20:32:07 1984 Date-Received: Thu, 22-Mar-84 04:16:13 EST References: <5976@umcp-cs.UUCP> Organization: Wash. Univ. in St. Louis, CS Dept. Lines: 29 [Elrod of Melvinbone, and his trusty sword Linesucker...] The varargs(3) stuff is particularly sensitive to this horseydoodoo. Try passing a pointer to an integer function using varargs, and getting it with a line such as int (*funcs)(); ... funcs=va_arg(ap,int (*p)()); The 4.2 BSD (Bugs Surface Daily) compiler does the Technicolor Yawn on this one. The fix is FM as far as I can tell: typedef int (*pintf)(); pintf func; func=va_arg(ap,pintf); works just fine. As Bill the Cat would say, " GACK! ". eric -- ..!ihnp4!afinitc!wucs!eric