From d7d845888808da6191ab6a70942fac6e3eb815ea Mon Sep 17 00:00:00 2001 From: grischka Date: Sat, 16 Jul 2011 15:53:30 +0200 Subject: Revert "better constant handling for expr_cond" It produced wrong code with one of my test projects. This reverts commit cd3d1a45f34be3c9a358f1743bcaf8aac897992e. --- tccgen.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'tccgen.c') diff --git a/tccgen.c b/tccgen.c index a7f943d..cfa7d8f 100644 --- a/tccgen.c +++ b/tccgen.c @@ -4040,10 +4040,6 @@ static void expr_cond(void) if (const_wanted) { expr_lor_const(); - } else { - expr_lor(); - } - if (const_wanted || ((vtop->r & (VT_VALMASK | VT_LVAL | VT_SYM)) == VT_CONST)) { if (tok == '?') { CType boolean; int c; @@ -4065,6 +4061,7 @@ static void expr_cond(void) vpop(); } } else { + expr_lor(); if (tok == '?') { next(); if (vtop != vstack) { -- cgit v1.3.1