Toot

Written by stefanct on 2024-08-10 at 16:14

Playing around with #C23 stuff and got surprised by this not working…

void func(void);

typedef typeof(func) func_type;

Since a function name is neither an expression nor a type name, it's not supported as operand to typeof (not sure that's all), fair enough but why? @AaronBallman @thephd

I'd have used it to have the prototypes of a library functions in a header and use the typedef within the "private" .c only. This would avoid the alternative of duplicating the prototype within the typedef.

=> More informations about this toot | View the thread | More toots from stefanct@chaos.social

Mentions

=> View AaronBallman@vivaldi.net profile | View thephd@pony.social profile

Tags

=> View c23 tag

Proxy Information
Original URL
gemini://mastogem.picasoft.net/toot/112938611296055946
Status Code
Success (20)
Meta
text/gemini
Capsule Response Time
228.568575 milliseconds
Gemini-to-HTML Time
0.565494 milliseconds

This content has been proxied by September (ba2dc).