diff --git a/Number_types/include/CGAL/FPU.h b/Number_types/include/CGAL/FPU.h index 241a129ec78..46e00349ee7 100644 --- a/Number_types/include/CGAL/FPU.h +++ b/Number_types/include/CGAL/FPU.h @@ -140,8 +140,9 @@ inline double IA_force_to_double(double x) // which has the same problem. This affects underflow and overflow cases. // In case one does not care about such "extreme" situations, one can // set CGAL_IA_NO_X86_OVER_UNDER_FLOW_PROTECT. -#if defined CGAL_FPU_HAS_EXCESS_PRECISION && \ - !defined CGAL_IA_NO_X86_OVER_UNDER_FLOW_PROTECT +// LLVM doesn't have -frounding-math so needs extra protection. +#if (defined CGAL_FPU_HAS_EXCESS_PRECISION && \ + !defined CGAL_IA_NO_X86_OVER_UNDER_FLOW_PROTECT) || defined __llvm__ # define CGAL_IA_FORCE_TO_DOUBLE(x) CGAL::IA_force_to_double(x) #else # define CGAL_IA_FORCE_TO_DOUBLE(x) (x) diff --git a/STL_Extension/src/CGAL/assertions.cpp b/STL_Extension/src/CGAL/assertions.cpp index 095e311a5e0..420e9c5fb66 100644 --- a/STL_Extension/src/CGAL/assertions.cpp +++ b/STL_Extension/src/CGAL/assertions.cpp @@ -49,7 +49,7 @@ _standard_error_handler( int line, const char* msg ) { -#if defined(__GNUG__) && !defined(__clang__) +#if defined(__GNUG__) && !defined(__llvm__) // After g++ 3.4, std::terminate defaults to printing to std::cerr itself. if (_error_behaviour == THROW_EXCEPTION) return; @@ -73,7 +73,7 @@ _standard_warning_handler( const char *, int line, const char* msg ) { -#if defined(__GNUG__) && !defined(__clang__) +#if defined(__GNUG__) && !defined(__llvm__) // After g++ 3.4, std::terminate defaults to printing to std::cerr itself. if (_warning_behaviour == THROW_EXCEPTION) return;