ridiculousfish / cdecl-blocks

The venerable cdecl, with Apple blocks support
977 stars 75 forks source link

Non-transitive behavior with function pointers and type qualifiers/specifiers. #28

Open CarlMitchellKT opened 3 years ago

CarlMitchellKT commented 3 years ago

Entering [declare funcptr as pointer to function (pointer to const int, const pointer to char) returning int prints out int (*funcptr)(const int *, char * const )](int (funcptr)(const int , char * const )). This is good.

Entering int (*funcptr)(const int *, char * const ) prints out syntax error. This is wrong. It should print declare funcptr as pointer to function (pointer to const int, const pointer to char) returning int.

Dropping the consts from the arguments prints correctly.