tinycc-devel
[Top][All Lists]
Advanced

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

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


From: Michael Matz
Subject: Re: [Tinycc-devel] clang 15.0 issue with tcctest.c
Date: Thu, 17 Nov 2022 15:12:19 +0100 (CET)
User-agent: Alpine 2.21 (LSU 202 2017-01-01)

Hello,


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 justified).

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).


Ciao,
Michael.

reply via email to

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