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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

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-67 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++ Compiler 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 0348C Copyright © 2007-2010 <strong>ARM</strong>. All rights reserved. 3-25<br />

ID101213<br />

Non-Confidential,

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

Saved successfully!

Ooh no, something went wrong!