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.

Compiler-specific Features<br />

Note<br />

You can also use this attribute on a typedef for a union data type. In this case it applies<br />

to all function parameters with that type.<br />

Mode<br />

Supported in GNU mode only.<br />

Example<br />

typedef union<br />

{<br />

int myint;<br />

float myfloat;<br />

} transparent_union_t;<br />

void Variable_Attributes_transparent_union_0(transparent_union_t aUnion<br />

__attribute__ ((transparent_union)))<br />

{<br />

static int aStatic;<br />

aStatic +=aUnion.myint;<br />

}<br />

void Variable_Attributes_transparent_union_1()<br />

{<br />

int aLocal =0;<br />

float bLocal =0;<br />

Variable_Attributes_transparent_union_0(aLocal);<br />

Variable_Attributes_transparent_union_0(bLocal);<br />

}<br />

See also<br />

• __attribute__((transparent_union)) on page 4-46.<br />

4.5.9 __attribute__((unused))<br />

Normally, the compiler warns if a variable is declared but is never referenced. This<br />

attribute informs the compiler that you expect a variable to be unused and tells it not<br />

issue a warning if it is not used.<br />

Note<br />

This variable attribute is a GNU compiler extension that is supported by the <strong>ARM</strong><br />

compiler.<br />

<strong>ARM</strong> DUI 0348C Copyright © 2007-2010 <strong>ARM</strong>. All rights reserved. 4-53<br />

ID101213<br />

Non-Confidential,

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

Saved successfully!

Ooh no, something went wrong!