@tranquillity@mastodon.minionflo.net
2026-11-14 04:33 UTC
Okay, how in the actual fuck do I forward-declare a variable of an anonymous struct type in a header then define its value in a C file?
We tried
extern struct {int a;} foo;
Then
foo = {0};
But that treats the latter with implicit int for some reason???
I guess you simply cannot use an anonymous struct here, or have to copy-pasta the struct def
Replies (1)
-
@tranquillity@mastodon.minionflo.net 2026-11-14 04:34
Ok nvm copypastaing the struct yells at me that it's a fucking redef too