Thanks All<br><br>Warm regards<br>--Dev<br><br><br><div class="gmail_quote">On Wed, Nov 14, 2012 at 12:21 AM, Matthieu Monrocq <span dir="ltr"><<a href="mailto:matthieu.monrocq@gmail.com" target="_blank">matthieu.monrocq@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br><br><div class="gmail_quote"><div><div class="h5">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><br>
13.11.2012, 22:39, "Devchandra L Meetei" <<a href="mailto:dlmeetei@gmail.com" target="_blank">dlmeetei@gmail.com</a>>:<br>
</div><div>> Hi all<br>
> is the above flag supported.<br>
<br>
</div>No.<br>
<div><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><font color="#888888"><br>
--<br>
Regards,<br>
Konstantin</font></span><br></blockquote></div></div><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.<span class="HOEnZb"><font color="#888888"><br><br>-- Matthieu<br></font></span></div>
</div>
</blockquote></div><br>