29.12.2014 Views

RealView Compilation Tools Compiler Reference Guide - ARM ...

RealView Compilation Tools Compiler Reference Guide - ARM ...

RealView Compilation Tools Compiler Reference Guide - ARM ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

C and C++ <strong>Compiler</strong> Implementation Limits<br />

D.2 Limits for integral numbers<br />

Table D-2 gives the ranges for integral numbers in <strong>ARM</strong> C and C++. The Endpoint<br />

column of the table gives the numerical value of the range endpoint. The Hex value<br />

column gives the bit pattern (in hexadecimal) that is interpreted as this value by the<br />

<strong>ARM</strong> compiler. These constants are defined in the limits.h include file.<br />

When entering a constant, choose the size and sign with care. Constants are interpreted<br />

differently in decimal and hexadecimal/octal. See the appropriate C or C++ standard, or<br />

any of the recommended C and C++ textbooks for more information, as described in<br />

Further reading on page viii.<br />

Table D-2 Integer ranges<br />

Constant Meaning Value Hex value<br />

CHAR_MAX Maximum value of char 255 0xFF<br />

CHAR_MIN Minimum value of char 0 0x00<br />

SCHAR_MAX Maximum value of signed char 127 0x7F<br />

SCHAR_MIN Minimum value of signed char –128 0x80<br />

UCHAR_MAX Maximum value of unsigned char 255 0xFF<br />

SHRT_MAX Maximum value of short 32767 0x7FFF<br />

SHRT_MIN Minimum value of short –32768 0x8000<br />

USHRT_MAX Maximum value of unsigned short 65535 0xFFFF<br />

INT_MAX Maximum value of int 2147483647 0x7FFFFFFF<br />

INT_MIN Minimum value of int –2147483648 0x80000000<br />

LONG_MAX Maximum value of long 2147483647 0x7FFFFFFF<br />

LONG_MIN Minimum value of long –2147483648 0x80000000<br />

ULONG_MAX Maximum value of unsigned long 4294967295 0xFFFFFFFF<br />

LLONG_MAX Maximum value of long long 9.2E+18 0x7FFFFFFF<br />

FFFFFFFF<br />

LLONG_MIN Minimum value of long long –9.2E+18 0x80000000<br />

00000000<br />

ULLONG_MAX Maximum value of unsigned long long 1.8E+19 0xFFFFFFFF<br />

FFFFFFFF<br />

D-4 Copyright © 2007, 2010 <strong>ARM</strong> Limited. All rights reserved. <strong>ARM</strong> DUI 0348A<br />

Non-Confidential

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!