Frederick said:
jobo:
The parentheses and dereference are redundant.
int f(int (*const Func)(int))
{
return Func(13);
}
For some reason cdecl chokes on your definition above. When I give it
just the parameter, it's fine:
cdecl> explain int (* const Func)(int)
declare Func as const pointer to function (int) returning int
But when I give it the whole thing (minus the name of the parameter), it
chokes:
cdecl> explain int f(int (*const)(int))
syntax error
On further exploration it seems to choke on all const pointers as
parameters:
cdecl> explain int f(int *const)
syntax error
However it works properly in the other direction:
cdecl> declare f as function (const pointer to function (int) returning
int) returning int
int f(int (* const )(int ))