AT&T C compilers

Dominick Samperi samperi at marob.MASA.COM
Mon Feb 27 03:17:32 AEST 1989


In article <1071 at auspex.UUCP> guy at 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 at marob.masa.com
uunet!hombre!samperi



More information about the Comp.lang.c mailing list