AT&T C compilers

Dominick Samperi samperi at marob.MASA.COM
Mon Feb 27 03:09:05 AEST 1989


In article <9717 at smoke.BRL.MIL> gwyn at brl.arpa (Doug Gwyn (VLD/VMB) <gwyn>) 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 at marob.masa.com
uunet!hombre!samperi



More information about the Comp.lang.c mailing list