From b42cb16b65ed237e6ec30f65d4f9647561515cb8 Mon Sep 17 00:00:00 2001 From: grischka Date: Wed, 5 Oct 2016 18:34:17 +0200 Subject: Misc. fixes Makefile : - do not 'uninstall' peoples /usr/local/doc entirely libtcc.c : - MEM_DEBUG : IDE-friendly output "file:line: ..." - always ELF for objects tccgen.c : - fix memory leak in new switch code - move static 'in_sizeof' out of function profiling : - define 'static' to empty resolve_sym() : - replace by dlsym() win32/64: fix R_XXX_RELATIVE fixme - was fixed for i386 already in 8e4d64be2fc1d707c7800c5096f6e0ea22cbd - do not -Lsystemdir if compiling to .o --- tccgen.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tccgen.c') diff --git a/tccgen.c b/tccgen.c index 8144dc0..c33cc81 100644 --- a/tccgen.c +++ b/tccgen.c @@ -54,6 +54,7 @@ ST_DATA Sym *define_stack; ST_DATA Sym *global_label_stack; ST_DATA Sym *local_label_stack; static int local_scope; +static int in_sizeof; ST_DATA int vlas_in_scope; /* number of VLAs that are currently in scope */ ST_DATA int vla_sp_root_loc; /* vla_sp_loc for SP before any VLAs were pushed */ @@ -3762,7 +3763,6 @@ ST_FUNC void unary(void) CType type; Sym *s; AttributeDef ad; - static int in_sizeof = 0; sizeof_caller = in_sizeof; in_sizeof = 0; @@ -5235,6 +5235,7 @@ static void block(int *bsym, int *csym, int is_expr) gcase(sw.p, sw.n, c, &a); if (sw.def_sym) gjmp_addr(sw.def_sym); + dynarray_reset(&sw.p, &sw.n); cur_switch = saved; /* break label */ gsym(a); -- cgit v1.3.1