Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!think!harvard!seismo!rochester!ur-helheim!badri From: badri@ur-helheim.UUCP (Badri Lokanathan) Newsgroups: net.lang.c Subject: Quirk in assignment of pointers to functions .. Message-ID: <437@ur-helheim.UUCP> Date: Tue, 28-Jan-86 16:28:15 EST Article-I.D.: ur-helhe.437 Posted: Tue Jan 28 16:28:15 1986 Date-Received: Fri, 31-Jan-86 23:57:06 EST Reply-To: badri@ur-helheim.UUCP (Badri Lokanathan) Organization: U. of Rochester, EE Dept. Lines: 31 The following problem may have been discussed before on this newsgroup; I came across it just recently. Consider the following (perfectly valid) statements: int abc(), (*f)(); . . . f = abc; This works (as per K & R) and all is well. Now consider void abc(), (*f)(); . . . f = abc; This was not accepted by our preprocessor (we run BSD4.2). However, code equivalent to this appears in spice3 (the latest release of spice from Berkeley.) I understand spice3 was written on BSD4.3, which leads me to believe that the 4.3 preprocessor handles things slightly differently. Any comments?? Badri ___________________________________________________________________ ' ` | ARPA : ur-helheim!badri@rochester.arpa | | UUCP : {allegra,cmcl2,cornell,decvax,harvard,seismo,topaz} | | !rochester!ur-helheim!badri | | USMAIL : 56 Lansdale St. Rochester NY14620 | | PHONE : off. (716)-271-6624 (716)-275-4066 -5139 | | : res. (716) 442-1578 | `-------------------------------------------------------------------'