[Top][All Lists]

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

Re: [Tinycc-devel] tcc compile broken with clang-3.3 (regression from 0.

From: Thomas Preudhomme
Subject: Re: [Tinycc-devel] tcc compile broken with clang-3.3 (regression from 0.9.26)
Date: Mon, 10 Mar 2014 09:06:24 +0800
User-agent: Roundcube Webmail/0.7.2

Le 2014-03-10 06:08, Austin English a écrit :
On Sun, Mar 9, 2014 at 10:24 AM, Thomas Preudhomme <address@hidden
[1]> wrote:

Le dimanche 9 mars 2014, 01:29:30 Austin English a écrit :

It broke between 0.9.25 and 0.9.26. Introduced by:
> 7a477d70cabe15fa66fd0f32fab5e95841a500e5 is the first bad commit
> commit 7a477d70cabe15fa66fd0f32fab5e95841a500e5
> Author: grischka <grischka>
> Date:   Wed Feb 6 19:01:07 2013 +0100
>     lib/Makefile: use CC, add bcheck to libtcc1.a
>     Also:
>     - fix "make tcc_p" (profiling version)
>     - remove old gcc flags:
>       -mpreferred-stack-boundary=2 -march=i386
>     - remove test "hello" for Darwin (cannot compile to file)
> address@hidden tinycc]$ git describe
> release_0_9_26-158-gfdb3b10
> clang -c libtcc1.c -o x86_64/libtcc1.o -I..  -Wall -g -O2
> -fheinous-gnu-extensions -DTCC_TARGET_X86_64
> libtcc1.c:697:45: error: too few arguments provided to
function-like macro
> invocation
> void *__va_copy(struct __va_list_struct *src)
> /usr/bin/../lib/clang/3.3/include/stdarg.h:40:9: note: macro
> defined here
> #define __va_copy(d,s) __builtin_va_copy(d,s)
>         ^
> libtcc1.c:697:16: error: expected ; after top level declarator
> void *__va_copy(struct __va_list_struct *src)
>                ^
>                ;
> 2 errors generated.
> make[1]: *** [x86_64/libtcc1.o] Error 1

Fixed. But there is another error with __clear_cache being defined
and I dont
know how to solve this. Why isnt this just a warning?

Best regards,


Works, and passes make test, thanks.

I dont get that warning. With release_0_9_26-164-gd3d8990, I get two
clang -o tccasm.o -c tccasm.c -DCONFIG_LDDIR=""lib64""
-DTCC_TARGET_X86_64 -I.  -Wall -g -O2 -fheinous-gnu-extensions
 tccasm.c:541:72: warning: data argument not used by format string
            sprintf(sname, (n?".%s%d":".%s"),
get_tok_str(tok1, NULL), n);

Yeah, so if n is non zero, you get 2 conversion specifications and there is 2 parameters. But when n is null, there is only 1 conversion specification but still 2 parameters. It's fine as it will just get ignored which is why clang just emits a warning.

~~~~~                            ^
clang -o tcc tcc.o libtcc.a -lm -ldl -I.  -Wall -g -O2
clang: warning: argument unused during compilation:

I guess fheinous-gnu-extensions is just a compilation flag and clang says that adding it to the command line was useless here since we are linking.

Best regards,


reply via email to

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