[comp.std.c] Function returing pointer to function

gwyn@smoke.BRL.MIL (Doug Gwyn) (11/09/89)

In article <90460@pyramid.pyramid.com> markhall@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.