ridiculousfish / cdecl-blocks

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

can't parse function pointer #35

Open rsp4jack opened 2 years ago

rsp4jack commented 2 years ago

const volatile unsigned long long int*const&&(*const&& b)(const volatile unsigned long long int*const*const*const(*const*const*const&&v)[0x1fb]);

rsp4jack commented 2 years ago

It should be like: declare b to rvalue reference to const pointer to function (rvalue reference to const pointer to const pointer to const pointer to array 0x1fb of const pointer to const pointer to const pointer to const volatile unsigned long long int) returning reference to reference to const pointer to const volatile unsigned long long int

thradams commented 1 year ago

Also:

void (*(*PF)(int a, int b))(void)
ridiculousfish commented 1 year ago

This 70s era parser doesn't like identifiers for function parameters. Try:

void (*(*PF)(int, int))(void)