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.6 Standard C and standard C++ language extensions<br />

The compiler supports numerous extensions to both the ISO C99 and the ISO C++<br />

Standards, such as various integral type extensions, various floating-point extensions,<br />

hexadecimal floating-point constants, and anonymous classes, structures, and unions.<br />

These extensions are available if:<br />

• the source language is C++ and you are compiling in non strict mode<br />

• the source language is C99 and you are compiling in non strict mode<br />

• the source language is C90 and you are compiling in non strict mode.<br />

These extensions are not available if:<br />

• the source language is C++ and the compiler is restricted to compiling strict C++<br />

using the --strict compiler option.<br />

• the source language is C99 and the compiler is restricted to compiling strict<br />

Standard C using the --strict compiler option.<br />

• the source language is C90 and the compiler is restricted to compiling strict C90<br />

using the --strict compiler option.<br />

3.6.1 Address of a register variable<br />

The address of a variable with register storage class can be taken.<br />

Errors<br />

The compiler generates a warning if you take the address of a variable with register<br />

storage class.<br />

Example<br />

void foo(void)<br />

{<br />

register int i;<br />

int *j = &i;<br />

}<br />

3.6.2 Arguments to functions<br />

Default arguments can be specified for function parameters other than those of a<br />

top-level function declaration. For example, they are accepted on typedef declarations<br />

and on pointer-to-function and pointer-to-member-function declarations.<br />

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

Non-Confidential

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

Saved successfully!

Ooh no, something went wrong!