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

Create successful ePaper yourself

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

Compiler-specific Features<br />

#ifndef FILE_H<br />

#define FILE_H<br />

#pragma once<br />

// optional ... body of the header file ...#endif<br />

The #pragma once is marked as optional in this example. This is because the compiler<br />

recognizes the #ifndef header guard coding and skips subsequent includes even if<br />

#pragma once is absent.<br />

4.6.18 #pragma Ospace<br />

This pragma instructs the compiler to perform optimizations to reduce image size at the<br />

expense of a possible increase in execution time.<br />

See also<br />

• #pragma Otime<br />

• -Ospace on page 2-99<br />

4.6.19 #pragma Otime<br />

This pragma instructs the compiler to perform optimizations to reduce execution time<br />

at the expense of a possible increase in image size.<br />

See also<br />

• #pragma Ospace<br />

• -Otime on page 2-99.<br />

4.6.20 #pragma pack(n)<br />

This pragma aligns members of a structure to the minimum of n and their natural<br />

alignment. Packed objects are read and written using unaligned accesses.<br />

Syntax<br />

#pragma pack(n)<br />

Where:<br />

n is the alignment in bytes, valid alignment values being 1, 2, 4 and 8.<br />

Default<br />

The default is #pragma pack(8).<br />

4-68 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!