News:

Download Pelles C here: http://www.smorgasbordet.com/pellesc/

Main Menu

size_t

Started by czerny, July 06, 2014, 04:39:10 PM

Previous topic - Next topic

czerny

There are at least two different (intrin.h or direct.h or regex.h) definitions of 'size_t':

typedef unsigned int size_t;
typedef unsigned long long size_t;

Is there a rule of thumb, which function uses which definition?

JohnF

#1
If you look in the headers you will find


#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

czerny

Oh sorry! That was easy!