mirror of https://github.com/CGAL/cgal
Small workarounds for LLVM.
This commit is contained in:
parent
ab56912a06
commit
1a6bc3f2d4
|
|
@ -140,8 +140,9 @@ inline double IA_force_to_double(double x)
|
||||||
// which has the same problem. This affects underflow and overflow cases.
|
// which has the same problem. This affects underflow and overflow cases.
|
||||||
// In case one does not care about such "extreme" situations, one can
|
// In case one does not care about such "extreme" situations, one can
|
||||||
// set CGAL_IA_NO_X86_OVER_UNDER_FLOW_PROTECT.
|
// set CGAL_IA_NO_X86_OVER_UNDER_FLOW_PROTECT.
|
||||||
#if defined CGAL_FPU_HAS_EXCESS_PRECISION && \
|
// LLVM doesn't have -frounding-math so needs extra protection.
|
||||||
!defined CGAL_IA_NO_X86_OVER_UNDER_FLOW_PROTECT
|
#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)
|
# define CGAL_IA_FORCE_TO_DOUBLE(x) CGAL::IA_force_to_double(x)
|
||||||
#else
|
#else
|
||||||
# define CGAL_IA_FORCE_TO_DOUBLE(x) (x)
|
# define CGAL_IA_FORCE_TO_DOUBLE(x) (x)
|
||||||
|
|
|
||||||
|
|
@ -49,7 +49,7 @@ _standard_error_handler(
|
||||||
int line,
|
int line,
|
||||||
const char* msg )
|
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.
|
// After g++ 3.4, std::terminate defaults to printing to std::cerr itself.
|
||||||
if (_error_behaviour == THROW_EXCEPTION)
|
if (_error_behaviour == THROW_EXCEPTION)
|
||||||
return;
|
return;
|
||||||
|
|
@ -73,7 +73,7 @@ _standard_warning_handler( const char *,
|
||||||
int line,
|
int line,
|
||||||
const char* msg )
|
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.
|
// After g++ 3.4, std::terminate defaults to printing to std::cerr itself.
|
||||||
if (_warning_behaviour == THROW_EXCEPTION)
|
if (_warning_behaviour == THROW_EXCEPTION)
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue