aboutsummaryrefslogtreecommitdiff
path: root/tcc.h
diff options
context:
space:
mode:
authorKirill Smelkov <kirr@navytux.spb.ru>2012-12-09 19:51:20 +0400
committerKirill Smelkov <kirr@navytux.spb.ru>2012-12-09 19:51:20 +0400
commita55ecf6d2cecae75dd456ec288d36a31344db1cf (patch)
tree59214457d2e592b9b1a995fcb54fd91e577cdc07 /tcc.h
parentc4a18f47a24ccc1345944120faf52a983be8fa33 (diff)
parent031ff872be7be76c2c088981a827cbb2a29dfc13 (diff)
downloadtinycc-a55ecf6d2cecae75dd456ec288d36a31344db1cf.tar.gz
tinycc-a55ecf6d2cecae75dd456ec288d36a31344db1cf.tar.bz2
Repair bounds-checking more, this time `tcc -b -run tcc.c -run tcc.c -run tcctest.c` works
Hello up there. On the list Grischka made a point that we can't recommend using -b as long as tcc -b tcc.c doesn't produce anything useful. Now it does, so please don't treat -b mode as second class citizen anymore. Thanks, Kirill * bcheck2: tests: Add tests for compile/run tcc.c with `tcc -b` then compile tcc.c again, then run tcctest.c lib/bcheck: Fix code typo in __bound_delete_region() lib/bcheck: Don't assume heap goes right after bss Make tcc work after self-compiling with bounds-check enabled
Diffstat (limited to 'tcc.h')
-rw-r--r--tcc.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/tcc.h b/tcc.h
index 9f81858..fe870d8 100644
--- a/tcc.h
+++ b/tcc.h
@@ -1127,7 +1127,8 @@ ST_DATA Sym *local_label_stack;
ST_DATA Sym *global_label_stack;
ST_DATA Sym *define_stack;
ST_DATA CType char_pointer_type, func_old_type, int_type, size_type;
-ST_DATA SValue vstack[VSTACK_SIZE], *vtop;
+ST_DATA SValue __vstack[1+/*to make bcheck happy*/ VSTACK_SIZE], *vtop;
+#define vstack (__vstack + 1)
ST_DATA int rsym, anon_sym, ind, loc;
ST_DATA int const_wanted; /* true if constant wanted */