paul-j-lucas / cdecl

Composing and deciphering C (or C++) declarations or casts, aka ‘‘gibberish.’’
GNU General Public License v3.0
90 stars 11 forks source link

spurious error from cdecl regarding __stdcall pointers #13

Closed blipvert closed 3 years ago

blipvert commented 3 years ago

Given the query

cdecl> declare foo as pointer to pointer to stdcall function (void) returning int

cdecl correctly responds

int (__stdcall **foo)(void);

However, when the output is given back to cdecl

cdecl> explain int (__stdcall **foo)(void)

it erroneously complains

error: "__stdcall": can be used only for functions and pointers to function

Note that the given expression is accepted without error by Microsoft's x86 compiler.

paul-j-lucas commented 3 years ago

I just pushed a fix. Do a git pull, try it out, and let me know.

blipvert commented 3 years ago

Thanks for the quick response! Can confirm it now works as expected. Closing the issue.