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

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 />

See also<br />

• New features of C99 on page 1-5 in the <strong>Compiler</strong> User <strong>Guide</strong>.<br />

3.7.8 Conditionals<br />

The middle operand in a conditional statement can be omitted, if the result is to be the<br />

same as the test, for example:<br />

i i : j;<br />

This is most useful if the test modifies the value in some way, for example:<br />

i++ : j;<br />

where i++ comes from a macro. If you write code in this way, then i++ is evaluated only<br />

once.<br />

If the original value of i is nonzero, the result is the original value of i. Regardless of<br />

this, i is incremented once.<br />

3.7.9 Initializers<br />

As in standard C++ and ISO C99, the elements of an aggregate initializer for an<br />

automatic variable are not required to be constant expressions.<br />

Mode<br />

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

Example<br />

float Initializers_0 (float f, float g)<br />

{<br />

float beat_freqs[2] = { f-g, f+g };<br />

float aLocal;<br />

int i=0;<br />

}<br />

for (; i

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

Saved successfully!

Ooh no, something went wrong!