<br><br><div class="gmail_quote">On Tue, Nov 13, 2012 at 7:44 PM, Konstantin Tokarev <span dir="ltr"><<a href="mailto:annulen@yandex.ru" target="_blank">annulen@yandex.ru</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im"><br>
13.11.2012, 22:39, "Devchandra L Meetei" <<a href="mailto:dlmeetei@gmail.com">dlmeetei@gmail.com</a>>:<br>
</div><div class="im">> Hi all<br>
> is the above flag supported.<br>
<br>
</div>No.<br>
<div class="im"><br>
> Will also appreciate if some one can tell best practices to follow while using clang for reducing size of the resultant binaries?<br>
<br>
</div>-Os -fno-rtti -fno-exceptions<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Regards,<br>
Konstantin</font></span><br></blockquote><div><br>I would note that this not exactly similar:<br><br>-fno-enforce-eh-specs<br>    Don't check for violation of exception specifications at runtime. This option violates the C++ standard, but may be useful for reducing code size in production builds, much like defining NDEBUG. The compiler will still optimize based on the exception specifications.  <br>
<br>This means that -fno-enforce-eh-specs let's you keep using exceptions.<br><br><br>A better alternative to `throw()` combined with `-fno-enforce-eh-specs` is `noexcept` in C++11. If you throw, you are into undefined behavior land because there is no runtime check.<br>
<br>I do not think there are similar alternatives when the exception specification did precise a list of exceptions, but those are much rarer.<br><br>-- Matthieu<br></div></div>