aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorseyko <seyko2@gmail.com>2015-03-29 11:52:16 +0300
committerseyko <seyko2@gmail.com>2015-03-29 11:52:16 +0300
commitdb08122d31a681e593c6679140d2df0cc63c8784 (patch)
tree43ff9739d8d54878aec4f32977dbb0b7af5bffa6
parentd80593bc4d4381331453d96d03c11d70247e2d70 (diff)
downloadtinycc-db08122d31a681e593c6679140d2df0cc63c8784.tar.gz
tinycc-db08122d31a681e593c6679140d2df0cc63c8784.tar.bz2
Fix for Microsoft compilers
Miccrosoft Visual Sudio (Express) 2008 and 2010 do not accept variable definitions C99 style, reported by Fabio <oldfaber@gmail.com>
-rw-r--r--lib/bcheck.c2
-rw-r--r--libtcc.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/bcheck.c b/lib/bcheck.c
index d70e657..8313098 100644
--- a/lib/bcheck.c
+++ b/lib/bcheck.c
@@ -81,7 +81,7 @@ void __bound_new_region(void *p, size_t size);
int __bound_delete_region(void *p);
#ifdef __attribute__
- /* __attribute__ is redifened in system headers */
+ /* an __attribute__ macro is defined in the system headers */
#undef __attribute__
#endif
#define FASTCALL __attribute__((regparm(3)))
diff --git a/libtcc.c b/libtcc.c
index a856865..533c14d 100644
--- a/libtcc.c
+++ b/libtcc.c
@@ -462,8 +462,8 @@ ST_FUNC void put_extern_sym2(Sym *sym, Section *section,
if (!sym->c) {
name = get_tok_str(sym->v, NULL);
#ifdef CONFIG_TCC_BCHECK
- char buf[32];
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 */