diff options
| author | grischka <grischka> | 2016-10-05 18:34:17 +0200 |
|---|---|---|
| committer | grischka <grischka> | 2016-10-05 18:34:17 +0200 |
| commit | b42cb16b65ed237e6ec30f65d4f9647561515cb8 (patch) | |
| tree | 4180321ae046754c683079c6e94764c3ab14e072 /tccgen.c | |
| parent | b691585785086024549cfb9ac65f3397263965aa (diff) | |
| download | tinycc-b42cb16b65ed237e6ec30f65d4f9647561515cb8.tar.gz tinycc-b42cb16b65ed237e6ec30f65d4f9647561515cb8.tar.bz2 | |
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
Diffstat (limited to 'tccgen.c')
| -rw-r--r-- | tccgen.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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); |
