aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorseyko <seyko2@gmail.com>2015-04-11 16:22:34 +0300
committerseyko <seyko2@gmail.com>2015-04-11 16:22:34 +0300
commit4bb9dd44f14f34b20e2718dbe9724998904153d8 (patch)
tree3ab6c806282b14d4422f736f0539efa3cc871220
parent5c9dde7255b2ecc38df8b31dc0bef16ea71f0757 (diff)
downloadtinycc-4bb9dd44f14f34b20e2718dbe9724998904153d8.tar.gz
tinycc-4bb9dd44f14f34b20e2718dbe9724998904153d8.tar.bz2
Fix for Microsoft compilers
Correction for the commit db08122d31a681e593c6679140d2df0cc63c8784 As pointed Thomas Preud'homme buf[] may be used outside of the block whit code: name = block;
-rw-r--r--libtcc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libtcc.c b/libtcc.c
index ade4472..0f1fdd0 100644
--- a/libtcc.c
+++ b/libtcc.c
@@ -434,6 +434,7 @@ ST_FUNC void put_extern_sym2(Sym *sym, Section *section,
ElfW(Sym) *esym;
const char *name;
char buf1[256];
+ char buf[32];
if (section == NULL)
sh_num = SHN_UNDEF;
@@ -463,7 +464,6 @@ ST_FUNC void put_extern_sym2(Sym *sym, Section *section,
name = get_tok_str(sym->v, NULL);
#ifdef CONFIG_TCC_BCHECK
if (tcc_state->do_bounds_check) {
- char buf[32];
/* XXX: avoid doing that for statics ? */
/* if bound checking is activated, we change some function
names by adding the "__bound" prefix */