thradams / cake

Cake a C23 front end and transpiler written in C
http://thradams.com/cake/index.html
GNU General Public License v3.0
534 stars 21 forks source link

_Generic code generation #133

Closed thradams closed 6 months ago

thradams commented 6 months ago

Generic is hiding everything, then it uncovers the part that is selected. the problem is that is uncovers too much generating bugs.

int main()
{
    _Generic(1, int : (typeof(1)*)0);
}

the solution is hide only non selected, and leave the true branch as it is.