29.10.2014 Views

ARM Compiler toolchain v4.1 for µVision Using the Compiler

ARM Compiler toolchain v4.1 for µVision Using the Compiler

ARM Compiler toolchain v4.1 for µVision Using the Compiler

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.

Overview of <strong>the</strong> compiler<br />

2.2 Source language modes of <strong>the</strong> compiler<br />

The compiler has three distinct source language modes that you can use to compile different<br />

varieties of C and C++ source code:<br />

ISO C90<br />

ISO C99<br />

ISO C++<br />

The compiler compiles C as defined by <strong>the</strong> 1990 C standard and addenda.<br />

Use <strong>the</strong> compiler option --c90 to compile C90 code. This is <strong>the</strong> default behavior.<br />

The compiler compiles C as defined by <strong>the</strong> 1999 C standard and addenda.<br />

Use <strong>the</strong> compiler option --c99 to compile C99 code.<br />

The compiler compiles C++ as defined by <strong>the</strong> 2003 standard, excepting wide<br />

streams and export templates.<br />

Use <strong>the</strong> compiler option --cpp to compile C++ code.<br />

The compiler provides support <strong>for</strong> numerous extensions to <strong>the</strong> C and C++ languages. The<br />

compiler has a mode where compliance to a source language is ei<strong>the</strong>r en<strong>for</strong>ced or relaxed:<br />

Strict mode In strict mode <strong>the</strong> compiler en<strong>for</strong>ces compliance with <strong>the</strong> language standard<br />

relevant to <strong>the</strong> source language.<br />

To compile in strict mode, use <strong>the</strong> command-line option --strict.<br />

2.2.1 See also<br />

Concepts<br />

• New language features of C99 on page 5-77<br />

• Hexadecimal floating-point numbers in C99 on page 5-83.<br />

Reference<br />

<strong>Compiler</strong> Reference:<br />

• --c90 on page 3-18<br />

• --c99 on page 3-18<br />

• --cpp on page 3-20<br />

• --strict, --no_strict on page 3-88<br />

• Source language modes on page 2-3<br />

• Language extensions and language compliance on page 2-5.<br />

<strong>ARM</strong> DUI 0375C Copyright © 2007-2008, 2011 <strong>ARM</strong>. All rights reserved. 2-3<br />

ID061811<br />

Non-Confidential

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

Saved successfully!

Ooh no, something went wrong!