On Tue Apr 14 17:20:11 2026 +0000, navi wrote:
compound literals were introduced in c99 at the same time as designated initializers (`POINT var = { .x = foo, .y = nya };`), no compiler should have one without the other, and we seem to use the initializer i can change this to a explicit variable + initializer + return, if preferred, but w.r.t. to portability it shouldn't matter unless we support c89-only compilers (to which case designated initializers are also an issue) That's not how it works, cf. the explanation under https://gitlab.winehq.org/wine/wine/-/wikis/Wine-Developer's-Guide/Coding-Practice#writing-portable-code. Whether feature X was standardized at the same time as feature Y is irrelevant, it doesn't tell us anything about what features are available in what version of what compiler.
The only thing that matters is whether it works with all the compilers that people are using to build Wine. Designated initializers work everywhere (more or less, cf. 26cac37309dbd31a39fc84c9996da205024f71ad for a recent example). Compound literals used to be more problematic, but they may be OK nowadays. We can put them in and see what happens, but note that if someone reports that it broke their build, they will have to be taken out, no matter what C99 says. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/10649#note_136151