Merge branch 'maint-0.3.0' into release-0.3.0
This commit is contained in:
commit
ea5368026d
|
@ -0,0 +1,3 @@
|
||||||
|
o Minor bugfixes (compilation warnings):
|
||||||
|
- Suppress -Wdouble-promotion warnings with clang 4.0. Fixes bug 22915;
|
||||||
|
bugfix on 0.2.8.1-alpha.
|
|
@ -5744,6 +5744,18 @@ clamp_double_to_int64(double number)
|
||||||
#define PROBLEMATIC_FLOAT_CONVERSION_WARNING
|
#define PROBLEMATIC_FLOAT_CONVERSION_WARNING
|
||||||
DISABLE_GCC_WARNING(float-conversion)
|
DISABLE_GCC_WARNING(float-conversion)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/*
|
||||||
|
With clang 4.0 we apparently run into "double promotion" warnings here,
|
||||||
|
since clang thinks we're promoting a double to a long double.
|
||||||
|
*/
|
||||||
|
#if defined(__clang__)
|
||||||
|
#if __has_warning("-Wdouble-promotion")
|
||||||
|
#define PROBLEMATIC_DOUBLE_PROMOTION_WARNING
|
||||||
|
DISABLE_GCC_WARNING(double-promotion)
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
/* NaN is a special case that can't be used with the logic below. */
|
/* NaN is a special case that can't be used with the logic below. */
|
||||||
if (isnan(number)) {
|
if (isnan(number)) {
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -5769,6 +5781,10 @@ DISABLE_GCC_WARNING(float-conversion)
|
||||||
|
|
||||||
/* Handle infinities and finite numbers with magnitude >= 2^63. */
|
/* Handle infinities and finite numbers with magnitude >= 2^63. */
|
||||||
return signbit(number) ? INT64_MIN : INT64_MAX;
|
return signbit(number) ? INT64_MIN : INT64_MAX;
|
||||||
|
|
||||||
|
#ifdef PROBLEMATIC_DOUBLE_PROMOTION_WARNING
|
||||||
|
ENABLE_GCC_WARNING(double-promotion)
|
||||||
|
#endif
|
||||||
#ifdef PROBLEMATIC_FLOAT_CONVERSION_WARNING
|
#ifdef PROBLEMATIC_FLOAT_CONVERSION_WARNING
|
||||||
ENABLE_GCC_WARNING(float-conversion)
|
ENABLE_GCC_WARNING(float-conversion)
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue