04.01.2015 Views

RealView Compilation Tools - ARM Information Center

RealView Compilation Tools - ARM Information Center

RealView Compilation Tools - ARM Information Center

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Introduction<br />

GNU extensions<br />

The compiler supports some extensions offered by the GNU<br />

compiler, for example, GNU-style extended lvalues and GNU<br />

builtin functions. For more information see:<br />

• Language compliance<br />

• GNU language extensions on page 3-25<br />

• Chapter 4 Compiler-specific Features.<br />

1.3.2 Language compliance<br />

<strong>ARM</strong>-specific extensions<br />

The compiler supports a range of extensions specific to the <strong>ARM</strong><br />

compiler, for example, instruction intrinsics and other builtin<br />

functions. See Chapter 4 Compiler-specific Features for more<br />

information.<br />

The compiler has several modes where compliance to a source language is either<br />

enforced or relaxed:<br />

Strict mode In strict mode the compiler enforces compliance with the language<br />

standard relevant to the source language. For example, the use of //-style<br />

comments results in an error when compiling strict C90.<br />

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

GNU mode In GNU mode all the GNU compiler extensions to the relevant source<br />

language are available. For example, in GNU mode:<br />

• case ranges in switch statements are available when the source<br />

language is any of C90, C99 or nonstrict C++<br />

• C99-style designated initializers are available when the source<br />

language is either C90 or nonstrict C++.<br />

To compile in GNU mode, use the compiler option --gnu.<br />

Note<br />

Some GNU extensions are also available when you are in a nonstrict<br />

mode.<br />

Example<br />

The following examples illustrate combining source language modes with language<br />

compliance modes:<br />

• Compiling a .cpp file with the command-line option --strict compiles Standard<br />

C++<br />

1-6 Copyright © 2007-2010 <strong>ARM</strong>. All rights reserved. <strong>ARM</strong> DUI 0348C<br />

Non-Confidential,<br />

ID101213

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

Saved successfully!

Ooh no, something went wrong!