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.

Compiler-specific Features<br />

Usage<br />

If the compiler knows that a function can never throw out, it might be able to generate<br />

smaller exception-handling tables for callers of that function.<br />

Restrictions<br />

If a call to a function results in a C++ exception being propagated from the call into the<br />

caller, the behavior is undefined.<br />

This modifier is ignored when not compiling with exceptions enabled.<br />

Example<br />

struct S<br />

{<br />

~S();<br />

};<br />

__declspec(nothrow) extern void f(void);<br />

void g(void)<br />

{<br />

S s;<br />

f();<br />

}<br />

See also<br />

• --force_new_nothrow, --no_force_new_nothrow on page 2-57<br />

• Using the ::operator new function on page 5-13.<br />

4.2.6 __declspec(notshared)<br />

The __declspec(notshared) attribute prevents a specific class from having its virtual<br />

functions table and RTTI exported. This holds true regardless of other options you<br />

apply. For example, the use of --export_all_vtbl does not override<br />

__declspec(notshared).<br />

Example<br />

struct __declspec(notshared) X<br />

{<br />

virtual int f();<br />

}; // do not export this<br />

int X::f()<br />

{<br />

return 1;<br />

}<br />

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

ID101213<br />

Non-Confidential,

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

Saved successfully!

Ooh no, something went wrong!