title: Enabling floating point exceptions on MinGW GCC?
body: <p>How does one enable floating point exceptions on <a href="http://en.cppreference.com/w/cpp/numeric/fenv" rel="nofollow noreferrer">MinGW GCC</a>, where <a href="http://www.gnu.org/savannah-checkouts/gnu/libc/manual/html_node/Control-Functions.html" rel="nofollow noreferrer">feenableexcept</a> is missing? Even <a href="https://gist.github.com/jvranish/4441299" rel="nofollow noreferrer">reasonably complete solutions</a> don't actually catch this, though it would appear that they intend to. I would prefer minimal code that is close to whatever future standards will emerge. Preferably, the code should work with and without SSE. A complete solution that shows how to enable the hardware signal, catch it, and reset it is preferable. Compiling cleanly with high optimization levels and full pedantic errors and warnings is a must. The ability to catch multiple times in a unit-test scenario is important. There are several questions that <a href="https://stackoverflow.com/questions/247053/">provide</a> <a href="https://stackoverflow.com/questions/2941611/">partial</a> <a href="https://stackoverflow.com/questions/5860999/">answers</a>.</p>