From 8f686ac4ec4fce1d712b97927342e2e1121a113c Mon Sep 17 00:00:00 2001 From: Christoph Hertzberg Date: Sat, 27 Feb 2021 18:30:47 +0100 Subject: [PATCH] clang 10 aggressively warns about precision loss when converting int to float (or long to double) (cherry picked from commit cd541ad52c8152340469cae210312c0e27829c8d) --- Eigen/src/Core/util/DisableStupidWarnings.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Eigen/src/Core/util/DisableStupidWarnings.h b/Eigen/src/Core/util/DisableStupidWarnings.h index 4501d3248..fe0cfec0b 100755 --- a/Eigen/src/Core/util/DisableStupidWarnings.h +++ b/Eigen/src/Core/util/DisableStupidWarnings.h @@ -44,6 +44,9 @@ #if __clang_major__ >= 3 && __clang_minor__ >= 5 #pragma clang diagnostic ignored "-Wabsolute-value" #endif + #if __clang_major__ >= 10 + #pragma clang diagnostic ignored "-Wimplicit-int-float-conversion" + #endif #if ( defined(__ALTIVEC__) || defined(__VSX__) ) && __cplusplus < 201103L // warning: generic selections are a C11-specific feature // ignoring warnings thrown at vec_ctf in Altivec/PacketMath.h