Comments on Clumsy Pointers

Mandeep Sandhu said:

Nice! The syntax on returning function pointers was a little tricky. Learnt that today! :)

Iouri said:

There is a website that you can use for this: https://cdecl.org/.

It can take a description like "declare x as pointer to function (array 10 of pointer to function (pointer to int) returning void) returning pointer to function (pointer to int) returning void" and give back its declaration like this:

void (*(*x)(void (*[10])(int *)))(int *)

Michael said:

I wrote a simple C parser once, and found this page to be very helpful in understanding complex C declarators: https://msdn.microsoft.com/en-us/library/1x82y1z4.aspx.

Peter Desnoyers said:

See R. P. Mody. 1992. "On understanding type declarations in C." SIGPLAN Not. 27, 6 (June 1992), 80-83.

It gives a short calculus for understanding pre-ANSI type declarations. Best quote from it: "We are now ready to tackle a famous horror — 'signal' of UNIX".