[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Tinycc-devel] About size_t and ptrdiff_t defines in tcc
From: |
Thomas Preud'homme |
Subject: |
[Tinycc-devel] About size_t and ptrdiff_t defines in tcc |
Date: |
Tue, 3 Jan 2012 22:15:58 +0100 |
User-agent: |
KMail/1.13.7 (Linux/3.1.0-1-amd64; KDE/4.6.5; x86_64; ; ) |
I was dealing with a bug report about tcc 0.9.25 having wrong size for size_t
and ptrdiff_t and realize it was corrected in later commits. However, the new
definition is different from i386, amd64 and arm ABI which define size_t to
unsigned int and ptrdiff_t to int on ARM and i386 and define size_t to unsigned
long and ptrdiff_t to long on amd64. Is there a reason for the divergence?
Below is the related piece of code in tcc mob:
#if defined TCC_TARGET_PE && defined TCC_TARGET_X86_64
tcc_define_symbol(s, "__SIZE_TYPE__", "unsigned long long");
tcc_define_symbol(s, "__PTRDIFF_TYPE__", "long long");
#else
tcc_define_symbol(s, "__SIZE_TYPE__", "unsigned long");
tcc_define_symbol(s, "__PTRDIFF_TYPE__", "long");
#endif
Best regards,
Thomas Preud'homme
signature.asc
Description: This is a digitally signed message part.
- [Tinycc-devel] About size_t and ptrdiff_t defines in tcc,
Thomas Preud'homme <=