|
@@ -127,16 +127,12 @@ int
|
|
tor_isinf(double x)
|
|
tor_isinf(double x)
|
|
{
|
|
{
|
|
/* Same as above, work around the "double promotion" warnings */
|
|
/* Same as above, work around the "double promotion" warnings */
|
|
-#if defined(MINGW_ANY) && GCC_VERSION >= 409
|
|
|
|
-#define PROBLEMATIC_FLOAT_CONVERSION_WARNING
|
|
|
|
|
|
+#ifdef PROBLEMATIC_FLOAT_CONVERSION_WARNING
|
|
DISABLE_GCC_WARNING(float-conversion)
|
|
DISABLE_GCC_WARNING(float-conversion)
|
|
-#endif /* defined(MINGW_ANY) && GCC_VERSION >= 409 */
|
|
|
|
-#if defined(__clang__)
|
|
|
|
-#if __has_warning("-Wdouble-promotion")
|
|
|
|
-#define PROBLEMATIC_DOUBLE_PROMOTION_WARNING
|
|
|
|
|
|
+#endif
|
|
|
|
+#ifdef PROBLEMATIC_DOUBLE_PROMOTION_WARNING
|
|
DISABLE_GCC_WARNING(double-promotion)
|
|
DISABLE_GCC_WARNING(double-promotion)
|
|
#endif
|
|
#endif
|
|
-#endif /* defined(__clang__) */
|
|
|
|
return isinf(x);
|
|
return isinf(x);
|
|
#ifdef PROBLEMATIC_DOUBLE_PROMOTION_WARNING
|
|
#ifdef PROBLEMATIC_DOUBLE_PROMOTION_WARNING
|
|
ENABLE_GCC_WARNING(double-promotion)
|
|
ENABLE_GCC_WARNING(double-promotion)
|
|
@@ -145,4 +141,3 @@ ENABLE_GCC_WARNING(double-promotion)
|
|
ENABLE_GCC_WARNING(float-conversion)
|
|
ENABLE_GCC_WARNING(float-conversion)
|
|
#endif
|
|
#endif
|
|
}
|
|
}
|
|
-
|
|
|