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

• __attribute__((noinline)) constant variable attribute on page 4-51<br />

• __declspec(noinline) on page 4-27<br />

• __attribute__((noinline)) on page 4-34.<br />

4.6.15 #pragma no_pch<br />

This pragma suppresses PCH processing for a given source file.<br />

See also<br />

• --pch on page 2-101<br />

• Precompiled header files on page 2-17 in the Compiler User Guide.<br />

4.6.16 #pragma Onum<br />

This pragma changes the optimization level.<br />

Syntax<br />

#pragma Onum<br />

Where:<br />

num<br />

is the new optimization level.<br />

The value of num is 0, 1, 2 or 3.<br />

See also<br />

• -Onum on page 2-96.<br />

4.6.17 #pragma once<br />

This pragma enables the compiler to skips subsequent includes of that header file.<br />

#pragma once is accepted for compatibility with other compilers, and enables you to use<br />

other forms of header guard coding. However, it is preferable to use #ifndef and #define<br />

coding because this is more portable.<br />

Example<br />

The following example shows the placement of a #ifndef guard around the body of the<br />

file, with a #define of the guard variable after the #ifndef.<br />

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

ID101213<br />

Non-Confidential,

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

Saved successfully!

Ooh no, something went wrong!