bound check fix

tcc-xref
bellard 2002-01-26 19:13:31 +00:00
parent 2d948c7610
commit 5bf9559e9e
1 changed files with 3 additions and 1 deletions

4
tcc.c
View File

@ -3101,7 +3101,9 @@ void gen_op(int op)
/* XXX: cast to int ? (long long case) */
vpushi(pointed_size(vtop[-1].t));
gen_op('*');
if (do_bounds_check) {
/* if evaluating constant expression, no code should be
generated, so no bound check */
if (do_bounds_check && !const_wanted) {
/* if bounded pointers, we generate a special code to
test bounds */
if (op == '-') {