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++ Implementation Details<br />

See Structures, unions, enumerations, and bitfields on page 5-7 for more information.<br />

Integer<br />

Integers are represented in two's complement form. The low word of a long long is at<br />

the low address in little-endian mode, and at the high address in big-endian mode.<br />

Float<br />

Floating-point quantities are stored in IEEE format:<br />

• float values are represented by IEEE single-precision values<br />

• double and long double values are represented by IEEE double-precision values.<br />

For double and long double quantities the word containing the sign, the exponent, and<br />

the most significant part of the mantissa is stored with the lower machine address in<br />

big-endian mode and at the higher address in little-endian mode. See Operations on<br />

floating-point types on page 5-6 for more information.<br />

Arrays and pointers<br />

The following statements apply to all pointers to objects in C and C++, except pointers<br />

to members:<br />

• Adjacent bytes have addresses that differ by one.<br />

• The macro NULL expands to the value 0.<br />

• Casting between integers and pointers results in no change of representation.<br />

• The compiler warns of casts between pointers to functions and pointers to data.<br />

• The type size_t is defined as unsigned int.<br />

• The type ptrdiff_t is defined as signed int.<br />

5.1.3 Operations on basic data types<br />

The <strong>ARM</strong> compiler performs the usual arithmetic conversions set out in relevant<br />

sections of the ISO C99 and ISO C++ standards. The following subsections describe<br />

additional points that relate to arithmetic operations.<br />

See also Expression evaluation on page B-7.<br />

Operations on integral types<br />

The following statements apply to operations on the integral types:<br />

• All signed integer arithmetic uses a two's complement representation.<br />

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

Non-Confidential

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

Saved successfully!

Ooh no, something went wrong!