tinycc-devel
[Top][All Lists]
Advanced

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

Re: [Tinycc-devel] Misleading warning message - both gcc and clang refus


From: Rob
Subject: Re: [Tinycc-devel] Misleading warning message - both gcc and clang refuse to compile and error out
Date: Sun, 26 Nov 2023 09:41:56 +0000

On Sun, 26 Nov 2023 at 07:22, Eric Raible <raible@gmail.com> wrote:
>
> The following program has an obvious bug, and both gcc and clang refuse
> to compile it with an on-point error.  tcc produces an incorrect warning and
> creates code that has no chance of working:
>
>> typedef struct symbol symbol;
>> extern void foo(symbol *);
>>
>> int main()
>> {
>>   foo(&(symbol){});
>> }
>
>
> tcc version 0.9.28rc 2023-11-08 mob@be8f894 (x86_64 Linux)
>
> This is obviously not a show-stopper, but using an incomplete type _is_ 
> something
> that can happen in real life, and tcc does a pretty poor job here.  I'd be 
> willing to take
> a look if someone can give me some hints.

Nice spot, sorted it in fb164e0ab48 ;)



reply via email to

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