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: <571@marob.MASA.COM> Date: 26 Feb 89 17:09:05 GMT References: <569@marob.MASA.COM> <9717@smoke.BRL.MIL> Reply-To: samperi@marob.masa.com (Dominick Samperi) Organization: ESCC New York City Lines: 22 In article <9717@smoke.BRL.MIL> gwyn@brl.arpa (Doug Gwyn (VLD/VMB) ) writes: >>The AT&T C compiler (from System V, Release 2?) chokes on a declaration >>of the form: >>extern int bob(double (*)()) ; > >Of course it does, because that's a function prototype, which was only >recently added to the C language. Yes, but this does not explain why the AT&T C++ translator chokes. It turns out that although the translator will not swallow this declaration, the following goes down without a whimper: typedef double (*PFD)() ; extern int bob(PFD) ; Furthermore, B. Stroustrup's C++ text claims that the first declaration should be valid (see Section 8.7). -- Dominick Samperi -- ESCC samperi@marob.masa.com uunet!hombre!samperi