Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!caip!ucla-cs!zeus!sdk From: sdk@zeus.cs.ucla.edu (Scott D Kalter) Newsgroups: net.micro.amiga Subject: Lattice 3.02 Question (3.02) Message-ID: <308@curly.ucla-cs.ARPA> Date: Thu, 31-Jul-86 21:04:57 EDT Article-I.D.: curly.308 Posted: Thu Jul 31 21:04:57 1986 Date-Received: Sat, 2-Aug-86 08:54:04 EDT Reply-To: sdk@zeus.UUCP (Scott D Kalter) Organization: UCLA Computer Science Department Lines: 34 Keywords: Lattice, bug I am having difficulty with the old 3.02 version of Lattice. I was hoping that someone could either point out that I am making a mistake or that there really is a major bug in the compiler. The problem I am having is using a pointer to a function, for instance: foo() { printf("Hi\n"); } bar() { int (*funptr)(); /* I believe this is the correct declaration */ funptr = foo; /* this line compiles without error */ funptr(); /* this line generates an ERROR so no quad file is made */ } The error generated is: 15 The identifier preceding the ( function call operator was not implicitly or explicitly declared as a function. I checked some old code I had written on a UNIX VAX that used function pointers and it looked much like the above. I don't understand why this doesn't work and I can't find any way to force it to work. If someone recognizes this as a known compiler bug; do you know if this is corrected in version 3.03 or the beta test 3.04 version? Thanks for the help, Scott Kalter