From 233d5d5f6fece119db97c34d680e4eda25f80e54 Mon Sep 17 00:00:00 2001 From: Christian Jullien Date: Thu, 17 Nov 2022 14:35:31 +0100 Subject: [PATCH] Fix old_style_f call when compiled by clang. --- tests/tcctest.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/tcctest.c b/tests/tcctest.c index 74513e34..0253a9d0 100644 --- a/tests/tcctest.c +++ b/tests/tcctest.c @@ -2900,7 +2900,15 @@ int cmpfn(); void old_style_function_test(void) { +#if CC_NAME == CC_clang + /* recent clang versions (at least 15.0) raise an error: + incompatible pointer to integer conversion passing 'void *' + For the purpose of this test, pass 1 instead. + */ + old_style_f(1, 2, 3.0); +#else old_style_f((void *)1, 2, 3.0); +#endif decl_func1(NULL); decl_func2(NULL); }