Small workarounds for LLVM.

This commit is contained in:
Marc Glisse 2011-08-12 15:50:05 +00:00
parent ab56912a06
commit 1a6bc3f2d4
2 changed files with 5 additions and 4 deletions

View File

@ -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)

View File

@ -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;