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.
_______________________________________________
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/tinycc-devel