Pelles C forum

Pelles C => General discussions => Topic started by: czerny on July 06, 2014, 04:39:10 PM

Title: size_t
Post by: czerny on July 06, 2014, 04:39:10 PM
There are at least two different (intrin.h or direct.h or regex.h) definitions of 'size_t':
Code: [Select]
typedef unsigned int size_t;
typedef unsigned long long size_t;
Is there a rule of thumb, which function uses which definition?
Title: Re: size_t
Post by: JohnF on July 06, 2014, 05:25:00 PM
If you look in the headers you will find

Code: [Select]
#if __POCC_TARGET__ == 3
typedef unsigned long long size_t;
#else
typedef unsigned int size_t;

In the help file is this.

__POCC_TARGET__
The current target processor specified through the /T option. Defined as the integer constant 1 for X86, or 3 for AMD64. [5.0]

So when compiling 64bit stuff size_t will be unsigned long long.

John
Title: Re: size_t
Post by: czerny on July 06, 2014, 06:02:37 PM
Oh sorry! That was easy!