Re: [Tinycc-devel] clang 15.0 issue with tcctest.c
Hi 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 Envoyé : jeudi 17 novembre 2022 15:12 À : jull...@eligis.com; tinycc-devel@nongnu.org Objet : Re: [Tinycc-devel] clang 15.0 issue with tcctest.c 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
Re: [Tinycc-devel] clang 15.0 issue with tcctest.c
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
[Tinycc-devel] clang 15.0 issue with tcctest.c
Hi team, I recently updated one of my x64 Linux machine with Fedora 37 which comes with clang 15.0. 'make test' raises this error when clang 15.0 is used: ./configure --with-selinux --cc=clang --prefix=/home/jullien/tinycc/static Binary directory/home/jullien/tinycc/static/bin TinyCC directory/home/jullien/tinycc/static/lib/tcc Library directory /home/jullien/tinycc/static/lib Include directory /home/jullien/tinycc/static/include Manual directory/home/jullien/tinycc/static/share/man Info directory /home/jullien/tinycc/static/share/info Doc directory /home/jullien/tinycc/static/share/doc Source path /home/jullien/tinycc C compiler clang (15.0) Target OS Linux CPU x86_64 Config selinux Creating config.mak and config.h 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); ^ 1 error generated. ___ Tinycc-devel mailing list Tinycc-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/tinycc-devel