I would have designed the feature like this: _Generic( , type1 : ( expr1 ), type2 : ( expr2 ), ... default : ( expr )) Here, the parentheses shown in this phrase pattern are required. The implementation would only parse and semantically analyze the expression of the matching type. For the others, the ( expr ) would be treated as a token sequence to be skipped, which has to contain valid tokens, and balancing parenthe…
Then you can safely refer to the value at its now-known type, even if `expr0` was not a variable to begin with.