29.10.2014 Views

ARM Compiler toolchain v4.1 for µVision Using the Compiler

ARM Compiler toolchain v4.1 for µVision Using the Compiler

ARM Compiler toolchain v4.1 for µVision Using the Compiler

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

<strong>Compiler</strong> Coding Practices<br />

5.71 Mixed declarations and statements in C99<br />

C99 enables you to mix declarations and statements within compound statements, like in C++.<br />

For example:<br />

void foo(float i)<br />

{<br />

i = (i > 0) ? -i : i;<br />

float j = sqrt(i);<br />

}<br />

// illegal in C90<br />

5.71.1 See also<br />

Concepts<br />

• New language features of C99 on page 5-77.<br />

<strong>ARM</strong> DUI 0375C Copyright © 2007-2008, 2011 <strong>ARM</strong>. All rights reserved. 5-89<br />

ID061811<br />

Non-Confidential

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

Saved successfully!

Ooh no, something went wrong!