[Top][All Lists]

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

Re: [Tinycc-devel] clang 15.0 issue with tcctest.c

From: Christian JULLIEN
Subject: Re: [Tinycc-devel] clang 15.0 issue with tcctest.c
Date: Thu, 17 Nov 2022 15:18:46 +0100 (CET)

I already pushed a patch. It lets tcc pass the test comparing with clang 
reference. Tell me if it's OK for you.
Christian Jullien
 De : Michael Matz <matz.tcc@frakked.de>
 Envoyé : jeudi 17 novembre 2022 15:12
 À : jullien@eligis.com; tinycc-devel@nongnu.org
 Objet : Re: [Tinycc-devel] clang 15.0 issue with tcctest.c


On Thu, 17 Nov 2022, Christian Jullien wrote:

> Test later fails with
> tcctest.c:2903:17: error: incompatible pointer to integer conversion passing
> 'void *' to parameter of type 'int' [-Wint-conversion]
>     old_style_f((void *)1, 2, 3.0);
>                 ^~~~~~~~~

So, this is a warning promoted to an error with recent clang.  We try to 
avoid such compatibility warnings explicitely (by compiling with -w), but 
clang doesn't heed this request anymore.

The warning here is a bit on the border because this is an old style 
function definition, and parameter types are not compared for calls to 
such functions (though the call will be undefined behaviour if the types 
aren't compatible, which is indeed the case here, so a warning is somewhat 

Can clang15 at least be convinced to not warn (and hence error out) here 
with -Wno-int-conversion?  If so that would be the solution.  If not, we 
have a problem, because tcc _wants_ to support exactly this situation 
(until we decide that we don't, then we need to adjust the testcase).


reply via email to

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