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 />

the integer value. The last character in the constant occupies the lowest-order byte<br />

of the integer value. Up to three preceding characters are placed at higher-order<br />

bytes. Unused bytes are filled with the NULL (\0) character.<br />

• Table 5-1 lists all integer character constants, that contain a single character or<br />

character escape sequence, are represented in both the source and execution<br />

character sets.<br />

Table 5-1 Character escape codes<br />

Escape sequence Char value Description<br />

\a 7 Attention (bell)<br />

\b 8 Backspace<br />

\t 9 Horizontal tab<br />

\n 10 New line (line feed)<br />

\v 11 Vertical tab<br />

\f 12 Form feed<br />

\r 13 Carriage return<br />

\xnn 0xnn ASCII code in hexadecimal<br />

\nnn 0nnn ASCII code in octal<br />

• Characters of the source character set in string literals and character constants<br />

map identically into the execution character set.<br />

• Data items of type char are unsigned by default. They can be explicitly declared<br />

as signed char or unsigned char:<br />

— the --signed_chars option can be used to make the char signed<br />

— the --unsigned_chars option can be used to make the char unsigned.<br />

Note<br />

Care must be taken when mixing translation units that have been compiled with<br />

and without the --[un]signed chars option, and that share interfaces or data<br />

structures.<br />

The <strong>ARM</strong> ABI defines char as an unsigned byte, and this is the interpretation used<br />

by the C++ libraries supplied with RVCT.<br />

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

Non-Confidential

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

Saved successfully!

Ooh no, something went wrong!