From 02caaf9c8d041c9b1993a2a21a2f24bc40a5bb7f Mon Sep 17 00:00:00 2001 From: Santiago Ospina De Los Rios <sospinar@gmail.com> Date: Fri, 6 Oct 2023 18:35:40 +0200 Subject: [PATCH] Guard floating point exceptions on playground --- src/istl-solver-playground.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/istl-solver-playground.cc b/src/istl-solver-playground.cc index 6c8225d82..de676b65c 100644 --- a/src/istl-solver-playground.cc +++ b/src/istl-solver-playground.cc @@ -101,7 +101,11 @@ int main(int argc, char** argv){ } if(config.get("FP_EXCEPT", false)) +#if defined( __APPLE__ ) or defined( __MINGW32__ ) + DUNE_THROW(NotImplemented, "Floating exceptions handling are not available on this system"); +#else feenableexcept(FE_DIVBYZERO | FE_INVALID | FE_OVERFLOW);// | FE_UNDERFLOW); +#endif int verbose = config.get("verbose", 1); if(mpihelper.rank() > 0) -- GitLab