bound check fix
This commit is contained in:
parent
2d948c7610
commit
5bf9559e9e
1 changed files with 3 additions and 1 deletions
4
tcc.c
4
tcc.c
|
@ -3101,7 +3101,9 @@ void gen_op(int op)
|
||||||
/* XXX: cast to int ? (long long case) */
|
/* XXX: cast to int ? (long long case) */
|
||||||
vpushi(pointed_size(vtop[-1].t));
|
vpushi(pointed_size(vtop[-1].t));
|
||||||
gen_op('*');
|
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
|
/* if bounded pointers, we generate a special code to
|
||||||
test bounds */
|
test bounds */
|
||||||
if (op == '-') {
|
if (op == '-') {
|
||||||
|
|
Loading…
Add table
Reference in a new issue