It produced wrong code with one of my test projects. This reverts commit cd3d1a45f34be3c9a358f1743bcaf8aac897992e.
Unified · Split
| @@ -4040,10 +4040,6 @@ static void expr_cond(void) · 4039 unmodified lines | |||
| 4040 | 4040 | ||
| 4041 | if (const_wanted) { | 4041 | if (const_wanted) { |
| 4042 | expr_lor_const(); | 4042 | expr_lor_const(); |
| 4043 | } else { | ||
| 4044 | expr_lor(); | ||
| 4045 | } | ||
| 4046 | if (const_wanted || ((vtop->r & (VT_VALMASK | VT_LVAL | VT_SYM)) == VT_CONST)) { | ||
| 4047 | if (tok == '?') { | 4043 | if (tok == '?') { |
| 4048 | CType boolean; | 4044 | CType boolean; |
| 4049 | int c; | 4045 | int c; |
| @@ -4065,6 +4061,7 @@ static void expr_cond(void) · 15 unmodified lines | |||
| 4065 | vpop(); | 4061 | vpop(); |
| 4066 | } | 4062 | } |
| 4067 | } else { | 4063 | } else { |
| 4064 | expr_lor(); | ||
| 4068 | if (tok == '?') { | 4065 | if (tok == '?') { |
| 4069 | next(); | 4066 | next(); |
| 4070 | if (vtop != vstack) { | 4067 | if (vtop != vstack) { |
| @@ -2083,8 +2083,6 @@ void *bounds_checking_is_enabled() · 2082 unmodified lines | |||
| 2083 | return (ca != cp + 1) ? cp : NULL; | 2083 | return (ca != cp + 1) ? cp : NULL; |
| 2084 | } | 2084 | } |
| 2085 | 2085 | ||
| 2086 | typedef int constant_negative_array_size_as_compile_time_assertion_idiom[(1 ? 2 : 0) - 1]; | ||
| 2087 | |||
| 2088 | void c99_vla_test(int size1, int size2) | 2086 | void c99_vla_test(int size1, int size2) |
| 2089 | { | 2087 | { |
| 2090 | #if defined __i386__ || defined __x86_64__ | 2088 | #if defined __i386__ || defined __x86_64__ |