Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!iuvax!rutgers!cmcl2!phri!marob!samperi From: samperi@marob.MASA.COM (Dominick Samperi) Newsgroups: comp.lang.c Subject: Re: AT&T C compilers Keywords: C compiler,bug? Message-ID: <572@marob.MASA.COM> Date: 26 Feb 89 17:17:32 GMT References: <569@marob.MASA.COM> <1071@auspex.UUCP> Reply-To: samperi@marob.masa.com (Dominick Samperi) Organization: ESCC New York City Lines: 15 In article <1071@auspex.UUCP> guy@auspex.UUCP (Guy Harris) writes: >I don't know whether it's legal C++ or not; if it is, I suspect the >declaration says, in C++, that the function to which the pointer points >takes no arguments (since C++, unlike C, does not have the notion of >"old-style" function declarations where an empty argument list indicates >that the types of the arguments are unknown). It is legal in C++ (see Section 8.7 of Stroustrup's text). Furthermore, changing the declaration to 'extern bob(double (*)(void)) ;' does not help. The only thing that the C++ translator will swallow is 'typedef double (*PFD)() ; extern bob(PFD) ;'. -- Dominick Samperi -- ESCC samperi@marob.masa.com uunet!hombre!samperi