tinycc-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Tinycc-devel] Fix for Microsoft compilers


From: Thomas Preud'homme
Subject: Re: [Tinycc-devel] Fix for Microsoft compilers
Date: Sat, 11 Apr 2015 16:43:02 +0800
User-agent: KMail/4.14.1 (Linux/3.16.0-4-amd64; KDE/4.14.2; x86_64; ; )

Le mardi 24 mars 2015, 22:55:49 oldfaber a écrit :
> Hi,
> 
> Miccrosoft Visual Sudio (Express) 2008 and 2010 do not accept variable
> definitions C99 style.
> Please apply this patch to mob
> 
> libtcc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/libtcc.c b/libtcc.c
> index 5a9681f..660c935 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 */

Except that later there is "name = buf;" with name staying live out of this if 
scope. So this change is not correct. It would be better to move it out up a 
bit.

Best regards,

Thomas

Attachment: signature.asc
Description: This is a digitally signed message part.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]