[Top][All Lists]

[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 (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

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");
    tcc_define_symbol(s, "__SIZE_TYPE__", "unsigned long");
    tcc_define_symbol(s, "__PTRDIFF_TYPE__", "long");

Best regards,

Thomas Preud'homme

reply via email to

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