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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>Compiler</strong>-specific Features<br />

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

4.6.13 #pragma no_pch<br />

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

See also<br />

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

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

4.6.14 #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-66.<br />

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

#ifndef FILE_H<br />

#define FILE_H<br />

#pragma once<br />

// optional<br />

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

Non-Confidential

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

Saved successfully!

Ooh no, something went wrong!