Previously exceptions were disabled by default in -O1 and above and
enabled in -O0, which could be confusing. On incoming exceptions are now
disabled in -O0 by default as well.

(The historic rationale was that we wanted -O0 to be as likely to work as
possible, but exception overhead was so high - even in innocent-looking C++
code due to destructors - that we disabled it when optimizing. But having
optimizations affect how a feature like exceptions is enabled or not by
default has been surprising to people.)

You may notice this change if you need exceptions and only run in -O0
(since if you test in -O1 or above, you'd have seen you need to enable
exceptions manually). In that case you will receive an error at runtime
saying that exceptions are disabled by default and that you should build
with -s DISABLE_EXCEPTION_CATCHING=0 to enable them.

Sorry for any inconvenience this causes, but hopefully this will save more
confusion than it creates.

- Alon

-- 
You received this message because you are subscribed to the Google Groups 
"emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to