diff --git a/GPU/Common/GPUCommonMath.h b/GPU/Common/GPUCommonMath.h index 350ef173467d5..01067ca032650 100644 --- a/GPU/Common/GPUCommonMath.h +++ b/GPU/Common/GPUCommonMath.h @@ -99,7 +99,12 @@ class GPUCommonMath GPUhdi() static float Remainderf(float x, float y); GPUd() constexpr static bool Finite(float x); GPUd() constexpr static bool IsNaN(float x); +#pragma GCC diagnostic push +#if defined(__FAST_MATH__) && defined(__clang__) +#pragma GCC diagnostic ignored "-Wnan-infinity-disabled" +#endif GPUd() constexpr static float QuietNaN() { return GPUCA_CHOICE(std::numeric_limits::quiet_NaN(), __builtin_nanf(""), nan(0u)); } +#pragma GCC diagnostic pop GPUd() constexpr static uint32_t Clz(uint32_t val); GPUd() constexpr static uint32_t Popcount(uint32_t val); diff --git a/GPU/GPUTracking/Definitions/GPULogging.h b/GPU/GPUTracking/Definitions/GPULogging.h index c8ba635d1af7a..800890045ec45 100644 --- a/GPU/GPUTracking/Definitions/GPULogging.h +++ b/GPU/GPUTracking/Definitions/GPULogging.h @@ -28,7 +28,12 @@ #define GPUFatal(...) #elif defined(GPUCA_STANDALONE) && !defined(GPUCA_GPUCODE_DEVICE) && !defined(GPUCA_NO_FMT) #include + #pragma GCC diagnostic push + #if defined(__FAST_MATH__) && defined(__clang__) + #pragma GCC diagnostic ignored "-Wnan-infinity-disabled" + #endif #include + #pragma GCC diagnostic pop #define GPUInfo(string, ...) \ { \ fmt::printf(string "\n", ##__VA_ARGS__); \