aboutsummaryrefslogtreecommitdiff
path: root/include/stdarg.h
diff options
context:
space:
mode:
authorJoe Soroka <gits@joesoroka.com>2011-04-11 23:39:27 -0700
committerJoe Soroka <gits@joesoroka.com>2011-04-11 23:39:27 -0700
commit812781cd1130059f4ac74608fbd6b8f1cff1d8b1 (patch)
tree6482d02cc18679cf3174111c2841e90960aa6361 /include/stdarg.h
parent1b0f42f8ad542efd9ddc4568822a6ad97a1a0da6 (diff)
downloadtinycc-812781cd1130059f4ac74608fbd6b8f1cff1d8b1.tar.gz
tinycc-812781cd1130059f4ac74608fbd6b8f1cff1d8b1.tar.bz2
simplify/rollback VLA pointer subtraction
I don't know if it makes a difference to gen_op(TOK_PDIV) or not, but logically the ptr1_is_vla test in TP's VLA patch seems out of order, where the patch to fix it would be: ------------------------------------------------------------------ @@ -1581,15 +1581,15 @@ ST_FUNC void gen_op(int op) u = pointed_size(&vtop[-1].type); } gen_opic(op); + if (ptr1_is_vla) + vswap(); /* set to integer type */ #ifdef TCC_TARGET_X86_64 vtop->type.t = VT_LLONG; #else vtop->type.t = VT_INT; #endif - if (ptr1_is_vla) - vswap(); - else + if (!ptr1_is_vla) vpushi(u); gen_op(TOK_PDIV); } else { ------------------------------------------------------------------ Instead of that patch, which increases the complexity of the code, this one fixes the problem by just rolling back and retrying with a simpler approach.
Diffstat (limited to 'include/stdarg.h')
0 files changed, 0 insertions, 0 deletions