tinycc-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Tinycc-devel] About size_t and ptrdiff_t defines in tcc


From: grischka
Subject: Re: [Tinycc-devel] About size_t and ptrdiff_t defines in tcc
Date: Wed, 04 Jan 2012 16:39:25 +0100
User-agent: Thunderbird 2.0.0.24 (Windows/20100228)

Thomas Preud'homme wrote:
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?

Maybe not really except to have less #ifdefs.  See
http://repo.or.cz/w/tinycc.git/commitdiff/3a1380120d8c952a34f6b5db0b3c42f794770f51
http://repo.or.cz/w/tinycc.git/commitdiff/e20bf69ac5adf3607c6e60ffdd5a0bb40b8f11ed


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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]