On Sat Jun 22 20:11:29 2024 +0000, Elizabeth Figura wrote:
It's a C99 compound literal; it's used in vkd3d at least. Per the C99 draft spec § 6.5.2.5 it has storage duration of the enclosing block. It's basically syntactic sugar for declaring a temporary variable with the given value.
Perhaps, but it still looks confusing at first, and so IMO not a good idea. I don't see what benefit it has over a local variable, or, lets say, separate parameters with #defined constants or enum for the flags.