aboutsummaryrefslogtreecommitdiff
path: root/src/lib/math
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2019-09-12 09:51:04 -0400
committerNick Mathewson <nickm@torproject.org>2019-09-12 09:51:04 -0400
commit0327f9a0757e202666ec54460a69303633af4b33 (patch)
treef1ab5e087e8fb3846eea8a3f1f6df5cdc9972784 /src/lib/math
parent896a1ac50b6ab182c1e15cc5271d0b24fcb90a31 (diff)
parent97f7efa9e3316e4e8970a87a1ee53fd4fd0075d8 (diff)
downloadtor-0327f9a0757e202666ec54460a69303633af4b33.tar.gz
tor-0327f9a0757e202666ec54460a69303633af4b33.zip
Merge branch 'ticket31687_035' into ticket31687_040
Diffstat (limited to 'src/lib/math')
-rw-r--r--src/lib/math/fp.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/lib/math/fp.c b/src/lib/math/fp.c
index 52c57c1d7f..9d93eaa878 100644
--- a/src/lib/math/fp.c
+++ b/src/lib/math/fp.c
@@ -62,12 +62,16 @@ clamp_double_to_int64(double number)
{
int exponent;
-#if defined(MINGW_ANY) && GCC_VERSION >= 409
+#if (defined(MINGW_ANY)||defined(__FreeBSD__)) && GCC_VERSION >= 409
/*
Mingw's math.h uses gcc's __builtin_choose_expr() facility to declare
isnan, isfinite, and signbit. But as implemented in at least some
versions of gcc, __builtin_choose_expr() can generate type warnings
even from branches that are not taken. So, suppress those warnings.
+
+ FreeBSD's math.h uses an __fp_type_select() macro, which dispatches
+ based on sizeof -- again, this can generate type warnings from
+ branches that are not taken.
*/
#define PROBLEMATIC_FLOAT_CONVERSION_WARNING
DISABLE_GCC_WARNING(float-conversion)