Boost logo

Boost :

Subject: Re: [boost] enabling/disabling floating point exceptions
From: Emil Dotchevski (emildotchevski_at_[hidden])
Date: 2009-08-31 03:53:25


Exception is a rather overloaded word in software development. If you
mean C++ exceptions (the only thing you can catch with a C++ catch),
those can only be thrown with the throw keyword; everything else is
not portable.

Emil Dotchevski
Reverge Studios, Inc.
http://www.revergestudios.com/reblog/index.php?n=ReCode

On Mon, Aug 31, 2009 at 12:00 AM, Gennadiy Rozental<rogeeff_at_[hidden]> wrote:
> Hi guys,
>
> I am looking to complete cross platform implementation of enabling/disabling
> logic in boost::execution_monitor. It looks like there is no standard
> interface available. I'm using _controlfp interface now on Windows. I also
> found these non-standard extensions:
>
> * feenableexcep/fedisableexcept available with glib 2.2
> * fesettrapenable avaialble in Dinkumware (implementation of STL?) and HP
> * sun has something called fex_set_handling. not sure when it's available
> though
> * header fpu_control.h. Not sure where it's available though.
> * MAC OS X has something called _MM_SET_EXCEPTION_MASK in xmmintrin.h
>
> It also seems that in some cases the switch is compile time only (using
> compilation option).
>
> Would anyone care to extend this list/comment on it's applicability and/or
> correctness?
>
> Another change I am considering is to split floating point exception
> catching from other system exceptions. It seems perfectly valid scenario  to
> set catch_system_error to false (thus avoid catching access violations etc)
> but still willing to catch and process floating point exception. What do you
> think?
>
> Gennadiy
>
> _______________________________________________
> Unsubscribe & other changes:
> http://lists.boost.org/mailman/listinfo.cgi/boost


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk