Comments on Clumsy Pointers

Post Comment

Mandeep Sandhu said:

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

30 Nov 2010 05:56 GMT (#1 of 4 comments)

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 *)
07 Jun 2011 05:02 GMT (#2 of 4 comments)

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.

24 Nov 2011 02:26 GMT (#3 of 4 comments)

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".

09 Dec 2011 18:18 GMT (#4 of 4 comments)
Post Comment