From 718fd591fa93ff254a9ca68a0ad2ff8a55756489 Mon Sep 17 00:00:00 2001 From: Michael Matz Date: Mon, 16 Apr 2012 01:13:25 +0200 Subject: Make sizeof() be of type size_t This matters when sizeof is directly used in arithmetic, ala "uintptr_t t; t &= -sizeof(long)" (for alignment). When sizeof isn't size_t (as it's specified to be) this masking will truncate the high bits of the uintptr_t object (if uintptr_t is larger than uint). --- tcc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tcc.h') diff --git a/tcc.h b/tcc.h index 95d5030..a674f92 100644 --- a/tcc.h +++ b/tcc.h @@ -1117,7 +1117,7 @@ ST_DATA Sym *local_stack; 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; +ST_DATA CType char_pointer_type, func_old_type, int_type, size_type; ST_DATA SValue vstack[VSTACK_SIZE], *vtop; ST_DATA int rsym, anon_sym, ind, loc; -- cgit v1.3.1