Workarounds for C11 _Generic()
I would have designed the feature like this:<p><pre><code>  _Generic(&lt;expr&gt;, type1 : ( expr1 ), type2 : ( expr2 ), ... default : ( expr ))
</code></pre>
Here, the parentheses shown in this phrase pattern are required.<p>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 parentheses, square brackets and braces.<p>E.g.<p><pre><code>   char *p = &quot;foo&quot;

   _Generic(p : int : (&quot;foo&quot; ++ &#x2F; ? ([]&amp;xyz) { ; } ),
                char * : (p[0]))

</code></pre>
Here, the type of p doesn&#x27;t match <i>int</i>, and so the interior token sequence of (&quot;foo&quot; ++ &#x2F; ? ([]&amp;xyz) { ; } ) would just be scanned to check for balancing parentheses, brackets and braces, which allows the parser to locate the next clause in the association list.