Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Cool, but it doesn't handle the last example:

  void (*signal(int, void (*fp)(int)))(int)
...claims there's a syntax error, and there might be, but I don't know off-hand.


It's confused by the parameter name fp.

    cdecl> explain void (*signal(int, void (*)(int)))(int) ;

    declare signal as function (int, pointer to function (int) returning void) returning pointer to function (int) returning void


This works:

  void (*signal(int, void (*)(int)))(int)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: