diff --git a/tcc.h b/tcc.h index 9e7c574b..859c85fb 100644 --- a/tcc.h +++ b/tcc.h @@ -1135,7 +1135,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 */ diff --git a/tccgen.c b/tccgen.c index f79da367..b9142d27 100644 --- a/tccgen.c +++ b/tccgen.c @@ -55,7 +55,7 @@ ST_DATA Sym *define_stack; ST_DATA Sym *global_label_stack; ST_DATA Sym *local_label_stack; -ST_DATA SValue vstack[VSTACK_SIZE], *vtop; +ST_DATA SValue __vstack[1+VSTACK_SIZE], *vtop; ST_DATA int const_wanted; /* true if constant wanted */ ST_DATA int nocode_wanted; /* true if no code generation wanted for an expression */ diff --git a/tccpp.c b/tccpp.c index aff5a535..b80c986c 100644 --- a/tccpp.c +++ b/tccpp.c @@ -3041,7 +3041,6 @@ ST_FUNC void preprocess_init(TCCState *s1) s1->ifdef_stack_ptr = s1->ifdef_stack; file->ifdef_stack_ptr = s1->ifdef_stack_ptr; - /* XXX: not ANSI compliant: bound checking says error */ vtop = vstack - 1; s1->pack_stack[0] = 0; s1->pack_stack_ptr = s1->pack_stack;