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

Example<br />

int bar(int b, int foo)<br />

{<br />

if (({<br />

int y = foo;<br />

int z;<br />

}<br />

if (y > 0) z = y;<br />

else z = -y;<br />

z>b;<br />

}))<br />

b++;<br />

return b;<br />

3.7.14 Unnamed fields<br />

When embedding a structure or union within another structure or union, you do not have<br />

to name the internal structure. You can access the contents of the unnamed structure<br />

without using .name to reference it.<br />

Unnamed fields are the same as anonymous unions and structures.<br />

Mode<br />

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

Example<br />

struct<br />

{<br />

int a;<br />

union<br />

{<br />

int b;<br />

float c;<br />

};<br />

int d;<br />

} Unnamed_Fields_0;<br />

int Unnamed_Fields_1()<br />

{<br />

return Unnamed_Fields_0.b;<br />

}<br />

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

Non-Confidential

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

Saved successfully!

Ooh no, something went wrong!