AT&T C compilers

Doug Gwyn gwyn at smoke.BRL.MIL
Sun Feb 26 15:46:06 AEST 1989


In article <1071 at auspex.UUCP> guy at auspex.UUCP (Guy Harris) writes:
- >extern int bob(double (*)()) ;
-... but doesn't say what sort of arguments that function takes.  I
-think this is legal, however.

Yes, it's legal, but it explicitly amounts to an "old style" declaration
of the "bob" function, with all the consequences thereof.

-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 ...

That's right.  Old C++ did not use func(void) but rather just func().
This may be changing toward ANSI C style, but I don't know for sure.



More information about the Comp.lang.c mailing list