Software Archive
Read-only legacy content
Announcements
This community is designed for sharing of public information. Please do not share Intel or third-party confidential information here.
17065 Discussions

Evolution of declarations for 'size_t' data type in some C++ compilers

SergeyKostrov
Valued Contributor II
400 Views
*** Evolution of declarations for 'size_t' data type in some C++ compilers ***
0 Kudos
12 Replies
SergeyKostrov
Valued Contributor II
400 Views
[ Abstract ] A fundamental data type size_t is used when a portability of C/C++ source codes is required. On 16-bit platforms sizeof( size_t ) is 2 bytes. On 32-bit platforms sizeof( size_t ) is 4 bytes. On 64-bit platforms sizeof( size_t ) is 8 bytes.
SergeyKostrov
Valued Contributor II
400 Views
[ Year 1987 - Turbo C compiler version 1 ( 16-bit ) ] ... #ifndef _SIZE_T #define _SIZE_T typedef unsigned size_t; #endif ...
SergeyKostrov
Valued Contributor II
400 Views
[ Year 1991 - Turbo C++ compiler version 3 ( 16-bit ) ] ... #ifndef _SIZE_T #define _SIZE_T typedef unsigned size_t; #endif ...
SergeyKostrov
Valued Contributor II
400 Views
[ Year 1996 - Visual C++ version 4 Enterprise Edition ( 32-bit ) ] ... #ifndef _SIZE_T_DEFINED typedef unsigned int size_t; #define _SIZE_T_DEFINED #endif ...
SergeyKostrov
Valued Contributor II
400 Views
[ Year 1998 - Visual Studio 98 Professional Edition ( 32-bit ) ] ... #ifndef _SIZE_T_DEFINED typedef unsigned int size_t; #define _SIZE_T_DEFINED #endif ...
SergeyKostrov
Valued Contributor II
400 Views
[ Year 2000 - Borland C++ compiler version 5 ( 32-bit ) ] ... /* Define the size_t type in the std namespace if in C++ or globally if in C. If we're in C++, make the _SIZE_T macro expand to std::size_t */ #if !defined(_SIZE_T) && !defined(_SIZE_T_DEFINED) #define _SIZE_T_DEFINED typedef unsigned int size_t; #if defined(__cplusplus) #define _SIZE_T std::size_t #else #define _SIZE_T size_t #endif #endif ...
SergeyKostrov
Valued Contributor II
400 Views
[ Year 2005 - Visual Studio 2005 Professional Edition ( 32-bit ) ] ... #ifndef _SIZE_T_DEFINED #ifdef _WIN64 typedef unsigned __int64 size_t; #else typedef _W64 unsigned int size_t; #endif #define _SIZE_T_DEFINED #endif ...
SergeyKostrov
Valued Contributor II
400 Views
[ Year 2008 - Visual Studio 2008 Professional Edition ( 32-bit ) ] ... #ifndef _SIZE_T_DEFINED #ifdef _WIN64 typedef unsigned __int64 size_t; #else typedef _W64 unsigned int size_t; #endif #define _SIZE_T_DEFINED #endif ...
SergeyKostrov
Valued Contributor II
400 Views
[ Year 2010 - Visual Studio 2010 Express Edition ( 32-bit ) ] ... #ifndef _SIZE_T_DEFINED #ifdef _WIN64 typedef unsigned __int64 size_t; #else typedef _W64 unsigned int size_t; #endif #define _SIZE_T_DEFINED #endif ...
SergeyKostrov
Valued Contributor II
400 Views
[ Year 2012 - Visual Studio 2012 Express Edition ( 32-bit ) ] ... #ifndef _SIZE_T_DEFINED #ifdef _WIN64 typedef unsigned __int64 size_t; #else typedef _W64 unsigned int size_t; #endif #define _SIZE_T_DEFINED #endif ...
SergeyKostrov
Valued Contributor II
400 Views
[ Year 2015 - MinGW C++ compiler version 5.1.0 ( 32-bit ) ] ... #ifndef _SIZE_T_DEFINED #define _SIZE_T_DEFINED #undef size_t #ifdef _WIN64 __MINGW_EXTENSION typedef unsigned __int64 size_t; #else typedef unsigned int size_t; #endif /* _WIN64 */ #endif /* _SIZE_T_DEFINED */ ...
SergeyKostrov
Valued Contributor II
400 Views
[ Year 2016 - MinGW C++ compiler version 6.1.0 ( 32-bit ) ] ... #ifndef _SIZE_T_DEFINED #define _SIZE_T_DEFINED #undef size_t #ifdef _WIN64 __MINGW_EXTENSION typedef unsigned __int64 size_t; #else typedef unsigned int size_t; #endif /* _WIN64 */ #endif /* _SIZE_T_DEFINED */ ...
Reply