aboutsummaryrefslogtreecommitdiff
path: root/tccgen.c
diff options
context:
space:
mode:
Diffstat (limited to 'tccgen.c')
-rw-r--r--tccgen.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/tccgen.c b/tccgen.c
index bbe1d83..c006f71 100644
--- a/tccgen.c
+++ b/tccgen.c
@@ -4238,6 +4238,35 @@ ST_FUNC void unary(void)
vpushi(is_compatible_types(&type1, &type2));
}
break;
+ case TOK_builtin_choose_expr:
+ {
+ int saved_nocode_wanted, c;
+ next();
+ skip('(');
+ c = expr_const();
+ skip(',');
+ if (!c) {
+ saved_nocode_wanted = nocode_wanted;
+ nocode_wanted = 1;
+ }
+ expr_eq();
+ if (!c) {
+ vpop();
+ nocode_wanted = saved_nocode_wanted;
+ }
+ skip(',');
+ if (c) {
+ saved_nocode_wanted = nocode_wanted;
+ nocode_wanted = 1;
+ }
+ expr_eq();
+ if (c) {
+ vpop();
+ nocode_wanted = saved_nocode_wanted;
+ }
+ skip(')');
+ }
+ break;
case TOK_builtin_constant_p:
{
int saved_nocode_wanted, res;