Data Types

Table 7-1 lists the size, representation, and range of each scalar data type for the C6000 compiler. Many of the range values are available as standard macros in the header file limits.h.

Table 7-1 TMS320C6000 C/C++ Data Types

Range
Type Size Representation Minimum Maximum
char, signed char 8 bits ASCII -128 127
unsigned char 8 bits ASCII 0 255
_Bool, bool 8 bits ASCII 0 (false) 1 (true)
short 16 bits Binary -32 768 32 767
unsigned short, wchar_t (1) 16 bits Binary 0 65 535
int, signed int 32 bits Binary -2 147 483 648 2 147 483 647
unsigned int 32 bits Binary 0 4 294 967 295
long, signed long 32 bits Binary -2 147 483 648 2 147 483 648
unsigned long 32 bits Binary 0 4 294 967 295
__int40_t 40 bits Binary -549 755 813 888 549 755 813 887
unsigned __int40_t 40 bits Binary 0 1 099 511 627 775
long long, signed long long 64 bits Binary -9 223 372 036 854 775 808 9 223 372 036 854 775 807
unsigned long long 64 bits Binary 0 18 446 744 073 709 551 615
enum (2) 32 bits Binary -2 147 483 648 2 147 483 647
float 32 bits IEEE 32-bit 1.175 494e-38(3) 3.40 282 346e+38
float complex (4) 64 bits Array of 2 IEEE 32-bit 1.175 494e-38 for real and imaginary portions separately 3.40 282 346e+38 for real and imaginary portions separately
double 64 bits IEEE 64-bit 2.22 507 385e-308(3) 1.79 769 313e+308
double complex (4)(5) 128 bits Array of 2 IEEE 64-bit 2.22 507 385e-308 for real and imaginary portions separately 1.79 769 313e+308 for real and imaginary portions separately
long double 64 bits IEEE 64-bit 2.22 507 385e-308(3) 1.79 769 313e+308
long double complex (4)(5) 128 bits Array of 2 IEEE 64-bit 2.22 507 385e-308 for real and imaginary portions separately 1.79 769 313e+308 for real and imaginary portions separately
pointers, references, pointer to data members 32 bits Binary 0 0xFFFFFFFF
This is the default type for wchar_t. You can use the --wchar_t option to change the wchar_t type to a 32-bit unsigned int type.
For details about the size of an enum type, see Section 7.4.1.
Figures are minimum precision.
To use complex data types, you must include the <complex.h> header file. See Section 7.5.1 for more about complex data types.
C6600 only

Negative values for signed types are represented using two's complement.

These additional types from C, C99 and C++ are defined as synonyms for standard types:

typedef unsigned int size_t; typedef int ptrdiff_t; typedef unsigned int wchar_t; typedef unsigned int wint_t; typedef char * va_list;