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.

Standard C Implementation Definition<br />

B.1.9<br />

Structures, unions, enumerations, and bitfields<br />

The ISO/IEC C standard requires the following implementation details to be<br />

documented for structured data types:<br />

• the outcome when a member of a union is accessed using a member of different<br />

type<br />

• the padding and alignment of members of structures<br />

• whether a plain int bitfield is treated as a signed int bitfield or as an unsigned int<br />

bitfield<br />

• the order of allocation of bitfields within a unit<br />

• whether a bitfield can straddle a storage-unit boundary<br />

• the integer type chosen to represent the values of an enumeration type.<br />

See Chapter 5 C and C++ Implementation Details for more information.<br />

Unions<br />

See Unions on page 5-7 for information.<br />

Enumerations<br />

See Enumerations on page 5-7 for information.<br />

Padding and alignment of structures<br />

See Structures on page 5-8 for information.<br />

Bitfields<br />

See Bitfields on page 5-10 for information.<br />

B.1.10<br />

Qualifiers<br />

An object that has a volatile-qualified type is accessed as a word, halfword, or byte as<br />

determined by its size and alignment. For volatile objects larger than a word, the order<br />

of accesses to the parts of the object is undefined. Updates to volatile bitfields generally<br />

require a read-modify-write. Accesses to aligned word, halfword and byte types are<br />

atomic. Other volatile accesses are not necessarily atomic.<br />

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

Non-Confidential,<br />

ID101213

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

Saved successfully!

Ooh no, something went wrong!