| @@ -6297,7 +6297,6 @@ static void expr_cond(void) · 6296 unmodified lines |
| 6297 | int tt, u, r1, r2, rc, t1, t2, islv, c, g; | 6297 | int tt, u, r1, r2, rc, t1, t2, islv, c, g; |
| 6298 | SValue sv; | 6298 | SValue sv; |
| 6299 | CType type; | 6299 | CType type; |
| 6300 | int ncw_prev; | | |
| 6301 | | 6300 | |
| 6302 | expr_lor(); | 6301 | expr_lor(); |
| 6303 | if (tok == '?') { | 6302 | if (tok == '?') { |
| @@ -6320,7 +6319,6 @@ static void expr_cond(void) · 16 unmodified lines |
| 6320 | tt = gvtst(0, 0); | 6319 | tt = gvtst(0, 0); |
| 6321 | } | 6320 | } |
| 6322 | | 6321 | |
| 6323 | ncw_prev = nocode_wanted; | | |
| 6324 | if (c == 0) | 6322 | if (c == 0) |
| 6325 | nocode_wanted++; | 6323 | nocode_wanted++; |
| 6326 | if (!g) | 6324 | if (!g) |
| @@ -6339,7 +6337,8 @@ static void expr_cond(void) · 12 unmodified lines |
| 6339 | } else | 6337 | } else |
| 6340 | u = 0; | 6338 | u = 0; |
| 6341 | | 6339 | |
| 6342 | nocode_wanted = ncw_prev; | 6340 | if (c == 0) |
| | 6341 | nocode_wanted--; |
| 6343 | if (c == 1) | 6342 | if (c == 1) |
| 6344 | nocode_wanted++; | 6343 | nocode_wanted++; |
| 6345 | skip(':'); | 6344 | skip(':'); |
| @@ -6356,7 +6355,6 @@ static void expr_cond(void) · 10 unmodified lines |
| 6356 | /* combine jump targets of 2nd op with VT_CMP of 1st op */ | 6355 | /* combine jump targets of 2nd op with VT_CMP of 1st op */ |
| 6357 | gvtst_set(0, t1); | 6356 | gvtst_set(0, t1); |
| 6358 | gvtst_set(1, t2); | 6357 | gvtst_set(1, t2); |
| 6359 | nocode_wanted = ncw_prev; | | |
| 6360 | // tcc_warning("two conditions expr_cond"); | 6358 | // tcc_warning("two conditions expr_cond"); |
| 6361 | return; | 6359 | return; |
| 6362 | } | 6360 | } |
| @@ -6394,7 +6392,8 @@ static void expr_cond(void) · 31 unmodified lines |
| 6394 | tt = gjmp(0); | 6392 | tt = gjmp(0); |
| 6395 | } | 6393 | } |
| 6396 | gsym(u); | 6394 | gsym(u); |
| 6397 | nocode_wanted = ncw_prev; | 6395 | if (c == 1) |
| | 6396 | nocode_wanted--; |
| 6398 | | 6397 | |
| 6399 | /* this is horrible, but we must also convert first | 6398 | /* this is horrible, but we must also convert first |
| 6400 | operand */ | 6399 | operand */ |