Function returing pointer to function
Doug Gwyn
gwyn at smoke.BRL.MIL
Thu Nov 9 16:53:34 AEST 1989
In article <90460 at pyramid.pyramid.com> markhall at pyrps5.pyramid.com (Mark Hall) writes:
>Under K&R, one would define a function returning a funtion pointer as:
> int ( * frfp () ) (p0, p1) int p0, p1; {}
I'm not sure K&R1 said that, but if so, they were wrong, since AT&T's
own PCC rejects that with two "syntax error" diagnostics.
>You *cannot* define this function as:
> int ( * frfp (p0,p1) ) () int p0, p1; {}
And PCC accepts this one.
>... is this a quiet change, or is there something I've overlooked?
It's sure not a quiet change in UNIX practice.
I don't know of any compilers that required the former construct
instead of the latter.
More information about the Comp.std.c
mailing list