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> Command-line Options<br />

Note<br />

For this reason, linker feedback is a safe optimization, but there might be a small<br />

impact on code size.<br />

• You have to do a full compile and link at least twice to get the maximum benefit<br />

from linker feedback. However, a single compile and link using feedback from a<br />

previous build is usually sufficient.<br />

See also<br />

• --split_sections on page 2-83<br />

• Using linker feedback on page 2-25 in the <strong>Compiler</strong> User <strong>Guide</strong>.<br />

2.1.51 --[no_]force_new_nothrow<br />

This option controls the behavior of new expressions in C++.<br />

The C++ standard states that only a no throw operator new, one that is declared with<br />

throw, is permitted to return NULL on failure. Any other operator new is never permitted<br />

to return NULL and the default operator new throws an exception on failure.<br />

If you use --force_new_nothrow, the compiler treats expressions such as new<br />

T(...args...), that use the global ::operator new or ::operator new[], as if they are new<br />

(std::nothrow) T(...args...).<br />

--force_new_nothrow also causes any class-specific operator new or any overloaded<br />

global operator new to be treated as no throw.<br />

Note<br />

The option --force_new_nothrow is provided only as a migration aid for legacy source<br />

code that does not conform to the C++ standard. Its use is not recommended.<br />

Mode<br />

This option is effective only if the source language is C++.<br />

Default<br />

The default is --no_force_new_nothrow.<br />

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

Non-Confidential

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

Saved successfully!

Ooh no, something went wrong!