From edd2d1735e2e4204d583ef4c7b4ccf6df98e8129 Mon Sep 17 00:00:00 2001 From: Marc Glisse Date: Wed, 24 Jul 2013 13:42:09 +0200 Subject: [PATCH] Interval arithmetics was broken even with gcc... --- Number_types/include/CGAL/FPU.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Number_types/include/CGAL/FPU.h b/Number_types/include/CGAL/FPU.h index e7cb6c009de..46c845e2a9a 100644 --- a/Number_types/include/CGAL/FPU.h +++ b/Number_types/include/CGAL/FPU.h @@ -152,8 +152,13 @@ inline double IA_force_to_double(double x) // In case one does not care about such "extreme" situations, one can // set CGAL_IA_NO_X86_OVER_UNDER_FLOW_PROTECT. // LLVM doesn't have -frounding-math so needs extra protection. +// GCC also migrates fesetround calls through FP instructions, so protect +// everyone (but Microsoft for now). +// TODO: reorganize the various protections, separating excess precision from +// abusive optimizations. #if (defined CGAL_FPU_HAS_EXCESS_PRECISION && \ - !defined CGAL_IA_NO_X86_OVER_UNDER_FLOW_PROTECT) || defined __llvm__ + !defined CGAL_IA_NO_X86_OVER_UNDER_FLOW_PROTECT) || defined __llvm__ \ + || !defined _MSC_VER # define CGAL_IA_FORCE_TO_DOUBLE(x) CGAL::IA_force_to_double(x) #else # define CGAL_IA_FORCE_TO_DOUBLE(x) (x)