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

Create successful ePaper yourself

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

Language Extensions<br />

3.7 GNU language extensions<br />

This section describes GNU compiler extensions that are supported by the <strong>ARM</strong><br />

compiler. These extensions are supported only in GNU mode, that is, when you compile<br />

your source code with the --gnu option. See Language compliance on page 1-6 and<br />

--gnu on page 2-44 for more information.<br />

Note<br />

Not all GNU compiler extensions are supported for all languages. For example,<br />

extended pointer arithmetic is not supported for C++.<br />

For more information on the use of the GNU extensions, see the GNU compiler<br />

documentation online at http://gcc.gnu.org.<br />

For additional reference material on the <strong>ARM</strong> compiler see also:<br />

• Appendix B Standard C Implementation Definition<br />

• Appendix C Standard C++ Implementation Definition<br />

• Appendix D C and C++ <strong>Compiler</strong> Implementation Limits.<br />

3.7.1 Alternate keywords<br />

The compiler recognizes alternate keywords of the form __keyword__. These alternate<br />

keywords have the same behavior as the original keywords.<br />

Example<br />

__const__ int pi = 3.14; // same as const int pi = 3.14<br />

3.7.2 asm keyword<br />

This keyword is a synonym for the __asm keyword.<br />

Mode<br />

Supported in GNU mode for C90 and C99 only.<br />

See also<br />

• __asm on page 4-5.<br />

3.7.3 Case ranges<br />

You can specify ranges of values in switch statements.<br />

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

Non-Confidential

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

Saved successfully!

Ooh no, something went wrong!