mirror of
https://github.com/frida/tinycc
synced 2024-11-28 02:29:38 +03:00
Revert "better constant handling for expr_cond"
It produced wrong code with one of my test projects.
This reverts commit cd3d1a45f3
.
This commit is contained in:
parent
adc80009c8
commit
d7d8458888
5
tccgen.c
5
tccgen.c
@ -4040,10 +4040,6 @@ static void expr_cond(void)
|
|||||||
|
|
||||||
if (const_wanted) {
|
if (const_wanted) {
|
||||||
expr_lor_const();
|
expr_lor_const();
|
||||||
} else {
|
|
||||||
expr_lor();
|
|
||||||
}
|
|
||||||
if (const_wanted || ((vtop->r & (VT_VALMASK | VT_LVAL | VT_SYM)) == VT_CONST)) {
|
|
||||||
if (tok == '?') {
|
if (tok == '?') {
|
||||||
CType boolean;
|
CType boolean;
|
||||||
int c;
|
int c;
|
||||||
@ -4065,6 +4061,7 @@ static void expr_cond(void)
|
|||||||
vpop();
|
vpop();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
expr_lor();
|
||||||
if (tok == '?') {
|
if (tok == '?') {
|
||||||
next();
|
next();
|
||||||
if (vtop != vstack) {
|
if (vtop != vstack) {
|
||||||
|
@ -2083,8 +2083,6 @@ void *bounds_checking_is_enabled()
|
|||||||
return (ca != cp + 1) ? cp : NULL;
|
return (ca != cp + 1) ? cp : NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
typedef int constant_negative_array_size_as_compile_time_assertion_idiom[(1 ? 2 : 0) - 1];
|
|
||||||
|
|
||||||
void c99_vla_test(int size1, int size2)
|
void c99_vla_test(int size1, int size2)
|
||||||
{
|
{
|
||||||
#if defined __i386__ || defined __x86_64__
|
#if defined __i386__ || defined __x86_64__
|
||||||
|
Loading…
Reference in New Issue
Block a user