mirror of
https://github.com/mirror/tinycc.git
synced 2025-03-12 09:00:09 +08:00
Fix for Microsoft compilers
Correction for the commit db08122d31
As pointed Thomas Preud'homme buf[] may be used outside of the block
whit code:
name = block;
This commit is contained in:
parent
5c9dde7255
commit
4bb9dd44f1
2
libtcc.c
2
libtcc.c
@ -434,6 +434,7 @@ ST_FUNC void put_extern_sym2(Sym *sym, Section *section,
|
|||||||
ElfW(Sym) *esym;
|
ElfW(Sym) *esym;
|
||||||
const char *name;
|
const char *name;
|
||||||
char buf1[256];
|
char buf1[256];
|
||||||
|
char buf[32];
|
||||||
|
|
||||||
if (section == NULL)
|
if (section == NULL)
|
||||||
sh_num = SHN_UNDEF;
|
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);
|
name = get_tok_str(sym->v, NULL);
|
||||||
#ifdef CONFIG_TCC_BCHECK
|
#ifdef CONFIG_TCC_BCHECK
|
||||||
if (tcc_state->do_bounds_check) {
|
if (tcc_state->do_bounds_check) {
|
||||||
char buf[32];
|
|
||||||
/* XXX: avoid doing that for statics ? */
|
/* XXX: avoid doing that for statics ? */
|
||||||
/* if bound checking is activated, we change some function
|
/* if bound checking is activated, we change some function
|
||||||
names by adding the "__bound" prefix */
|
names by adding the "__bound" prefix */
|
||||||
|
Loading…
Reference in New Issue
Block a user