History

bound check fix

bellard committed 24 years ago

Commit 5bf95591 parent 2d948c71 file · +3 −1Browse files

Unified · Split

tcc.c+3−1
@@ -3101,7 +3101,9 @@ void gen_op(int op) · 3100 unmodified lines
31013101 /* XXX: cast to int ? (long long case) */
31023102 vpushi(pointed_size(vtop[-1].t));
31033103 gen_op('*');
3104− if (do_bounds_check) {
3104+ /* if evaluating constant expression, no code should be
3105+ generated, so no bound check */
3106+ if (do_bounds_check && !const_wanted) {
31053107 /* if bounded pointers, we generate a special code to
31063108 test bounds */
31073109 if (op == '-') {

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t