Datasheet

C and C++ Compiler Implementation Limits
ARM DUI 0067D Copyright © 1999-2001 ARM Limited. All rights reserved. D-5
D.3 Limits for integral numbers
Table D-3 gives the ranges for integral numbers in ARM C and C++. The third column
of the table gives the numerical value of the range endpoint. The fourth column gives
the bit pattern (in hexadecimal) that would be interpreted as this value by the ARM
compilers.
When entering a constant, choose the size and sign with care. Constants are interpreted
differently in decimal and hexadecimal/octal. See the appropriate C or C++ standard, or
any of the recommended C and C++ textbooks for more details (see Further reading on
page ix).
Table D-3 Integer ranges
Constant Meaning Endpoint Hex value
CHAR_MAX
Maximum value of
char
255
0xFF
CHAR_MIN
Minimum value of
char
0
0x00
SCHAR_MAX
Maximum value of
signed char
127
0x7F
SCHAR_MIN
Minimum value of
signed char
–128
0x80
UCHAR_MAX
Maximum value of
unsigned char
255
0xFF
SHRT_MAX
Maximum value of
short
32767
0x7FFF
SHRT_MIN
Minimum value of
short
–32768
0x8000
USHRT_MAX
Maximum value of
unsigned short
65535
0xFFFF
INT_MAX
Maximum value of
int
2147483647
0x7FFFFFFF
INT_MIN
Minimum value of
int
–2147483648
0x80000000
LONG_MAX
Maximum value of
long
2147483647
0x7FFFFFFF
LONG_MIN
Minimum value of
long
–2147483648
0x80000000
ULONG_MAX
Maximum value of
unsigned long
4294967295
0xFFFFFFFF
LONG_LONG_MAX
Maximum value of
long long
9.2E+18
0x7FFFFFFF
FFFFFFFF
LONG_LONG_MIN
Minimum value of
long long
–9.2E+18
0x80000000
00000000
ULONG_LONG_MAX
Maximum value of
unsigned long long
1.8E+19
0xFFFFFFFF
FFFFFFFF