mirror of
https://github.com/frida/tinycc
synced 2025-01-12 14:49:18 +03:00
x86-64: change the type of size_t and ptrdiff_t.
size_t and ptrdiff_t should be unsigned long and long, respectively.
This commit is contained in:
parent
834b782a9c
commit
3a1380120d
4
libtcc.c
4
libtcc.c
@ -1892,8 +1892,8 @@ TCCState *tcc_new(void)
|
||||
tcc_define_symbol(s, "__TINYC__", NULL);
|
||||
|
||||
/* tiny C & gcc defines */
|
||||
tcc_define_symbol(s, "__SIZE_TYPE__", "unsigned int");
|
||||
tcc_define_symbol(s, "__PTRDIFF_TYPE__", "int");
|
||||
tcc_define_symbol(s, "__SIZE_TYPE__", "unsigned long");
|
||||
tcc_define_symbol(s, "__PTRDIFF_TYPE__", "long");
|
||||
#ifdef TCC_TARGET_PE
|
||||
tcc_define_symbol(s, "__WCHAR_TYPE__", "unsigned short");
|
||||
#else
|
||||
|
@ -592,6 +592,8 @@ void array_test(int a[4])
|
||||
printf(" %3d", ((int *)tab2)[i]);
|
||||
}
|
||||
printf("\n");
|
||||
printf("sizeof(size_t)=%d\n", sizeof(size_t));
|
||||
printf("sizeof(ptrdiff_t)=%d\n", sizeof(ptrdiff_t));
|
||||
}
|
||||
|
||||
void expr_test()
|
||||
|
Loading…
Reference in New Issue
Block a user