[tor-dev] Compile warns
grarpamp
grarpamp at gmail.com
Thu Sep 12 09:15:11 UTC 2019
On 9/10/19, Nick Mathewson <nickm at torproject.org> wrote:
> https://trac.torproject.org/projects/tor/ticket/31687
> needs testing; please let me know if it works for you.
Works. The second hunk for fp.c is below.
> Is it possible that
> a new compiler version or new headers in FreeBSD is what has made them
> start appearing?
Possible, depending on date, gaps in reporting, etc...
FreeBSD switched its base from gcc 4.2+ to llvm 3.3 in FreeBSD 10 (2014q1).
https://svnweb.freebsd.org/base/stable/12/contrib/gcc/?view=log
https://svnweb.freebsd.org/base/stable/12/contrib/llvm/?view=log
Users can choose among some compiler toolchain major revs from ports,
users default choice of "llvm" / "gcc" has dates in here...
https://svnweb.freebsd.org/ports/head/Mk/bsd.default-versions.mk?view=log
FreeBSD 12.x default is at llvm 8.0.1, which doesn't complain.
> do you see these warnings if you go
> back and build 0.4.0 or 0.3.5?
Yes to both.
============================================================
--- tor-0.4.1.5/src/lib/math/fp.c.orig 2019-06-10 08:46:16.000000000 -0400
+++ tor-0.4.1.5/src/lib/math/fp.c
@@ -123,7 +123,7 @@
tor_isinf(double x)
{
/* Same as above, work around the "double promotion" warnings */
-#if defined(MINGW_ANY) && GCC_VERSION >= 409
+#if (defined(MINGW_ANY)||defined(__FreeBSD__)) && GCC_VERSION >= 409
#define PROBLEMATIC_FLOAT_CONVERSION_WARNING
DISABLE_GCC_WARNING(float-conversion)
#endif /* defined(MINGW_ANY) && GCC_VERSION >= 409 */
============================================================
More information about the tor-dev
mailing list