mirror of
git://repo.or.cz/tinycc.git
synced 2026-06-19 11:24:19 +08:00
tests: fix tcctest.c for modern clang (15+) on macOS
This commit is contained in:
parent
f220a8c32f
commit
b1763f8629
@ -2928,19 +2928,15 @@ int cmpfn();
|
||||
printf("cmpfn=%lx\n", (long)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);
|
||||
void old_style_function_test(void)
|
||||
{
|
||||
/* 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);
|
||||
decl_func1(NULL);
|
||||
decl_func2(NULL);
|
||||
}
|
||||
|
||||
void alloca_test()
|
||||
@ -3993,8 +3989,8 @@ void builtin_test(void)
|
||||
}
|
||||
}
|
||||
|
||||
#if defined _WIN32 || (defined __APPLE__ && GCC_MAJOR >= 15)
|
||||
void weak_test(void) {}
|
||||
#if defined _WIN32 || defined __APPLE__
|
||||
void weak_test(void) {}
|
||||
#else
|
||||
extern int __attribute__((weak)) weak_f1(void);
|
||||
extern int __attribute__((weak)) weak_f2(void);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user