From: Vasyl Vavrychuk <vvavrychuk@gmail.com>
To: musl@lists.openwall.com
Subject: implicit conversion loses floating-point precision
Date: Sat, 5 Jul 2014 14:25:02 +0300 [thread overview]
Message-ID: <CAGj4m+7SuXBQQS0TrmqO0eKH7myxUXF9G=bfjhxpeJMNGbyxJw@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 14607 bytes --]
Hi,
For musl 1.1.3 building with libc++ and clang I get
/usr/local/opt/musl/include/math.h:97:1: error: implicit conversion loses
floating-point precision: 'double_t' (aka 'double') to 'float'
[-Werror,-Wconversion]
__ISREL_DEF(less, <, double_t)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/opt/musl/include/math.h:94:23: note: expanded from macro
'__ISREL_DEF'
{ return !isunordered(__x,__y) && __x op __y; }
~~~~~~~~~~~~^~~~~~~~
/usr/local/opt/musl/include/math.h:90:34: note: expanded from macro
'isunordered'
#define isunordered(x,y) (isnan((x)) ? ((void)(y),1) : isnan((y)))
^
/usr/local/opt/musl/include/math.h:67:45: note: expanded from macro 'isnan'
sizeof(x) == sizeof(float) ? (__FLOAT_BITS(x) & 0x7fffffff) >
0x7f800000 : \
^
/usr/local/opt/musl/include/math.h:97:1: error: implicit conversion loses
floating-point precision: 'double_t' (aka 'double') to 'float'
[-Werror,-Wconversion]
__ISREL_DEF(less, <, double_t)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/opt/musl/include/math.h:94:27: note: expanded from macro
'__ISREL_DEF'
{ return !isunordered(__x,__y) && __x op __y; }
~~~~~~~~~~~~~~~~^~~~
/usr/local/opt/musl/include/math.h:90:63: note: expanded from macro
'isunordered'
#define isunordered(x,y) (isnan((x)) ? ((void)(y),1) : isnan((y)))
^
/usr/local/opt/musl/include/math.h:67:45: note: expanded from macro 'isnan'
sizeof(x) == sizeof(float) ? (__FLOAT_BITS(x) & 0x7fffffff) >
0x7f800000 : \
^
/usr/local/opt/musl/include/math.h:98:1: error: implicit conversion loses
floating-point precision: 'long double' to 'float' [-Werror,-Wconversion]
__ISREL_DEF(lessl, <, long double)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/opt/musl/include/math.h:94:23: note: expanded from macro
'__ISREL_DEF'
{ return !isunordered(__x,__y) && __x op __y; }
~~~~~~~~~~~~^~~~~~~~
/usr/local/opt/musl/include/math.h:90:34: note: expanded from macro
'isunordered'
#define isunordered(x,y) (isnan((x)) ? ((void)(y),1) : isnan((y)))
^
/usr/local/opt/musl/include/math.h:67:45: note: expanded from macro 'isnan'
sizeof(x) == sizeof(float) ? (__FLOAT_BITS(x) & 0x7fffffff) >
0x7f800000 : \
^
/usr/local/opt/musl/include/math.h:98:1: error: implicit conversion loses
floating-point precision: 'long double' to 'double' [-Werror,-Wconversion]
__ISREL_DEF(lessl, <, long double)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/opt/musl/include/math.h:94:23: note: expanded from macro
'__ISREL_DEF'
{ return !isunordered(__x,__y) && __x op __y; }
~~~~~~~~~~~~^~~~~~~~
/usr/local/opt/musl/include/math.h:90:34: note: expanded from macro
'isunordered'
#define isunordered(x,y) (isnan((x)) ? ((void)(y),1) : isnan((y)))
^
/usr/local/opt/musl/include/math.h:68:47: note: expanded from macro 'isnan'
sizeof(x) == sizeof(double) ? (__DOUBLE_BITS(x) & -1ULL>>1) >
0x7ffULL<<52 : \
^
/usr/local/opt/musl/include/math.h:98:1: error: implicit conversion loses
floating-point precision: 'long double' to 'float' [-Werror,-Wconversion]
__ISREL_DEF(lessl, <, long double)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/opt/musl/include/math.h:94:27: note: expanded from macro
'__ISREL_DEF'
{ return !isunordered(__x,__y) && __x op __y; }
~~~~~~~~~~~~~~~~^~~~
/usr/local/opt/musl/include/math.h:90:63: note: expanded from macro
'isunordered'
#define isunordered(x,y) (isnan((x)) ? ((void)(y),1) : isnan((y)))
^
/usr/local/opt/musl/include/math.h:67:45: note: expanded from macro 'isnan'
sizeof(x) == sizeof(float) ? (__FLOAT_BITS(x) & 0x7fffffff) >
0x7f800000 : \
^
/usr/local/opt/musl/include/math.h:98:1: error: implicit conversion loses
floating-point precision: 'long double' to 'double' [-Werror,-Wconversion]
__ISREL_DEF(lessl, <, long double)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/opt/musl/include/math.h:94:27: note: expanded from macro
'__ISREL_DEF'
{ return !isunordered(__x,__y) && __x op __y; }
~~~~~~~~~~~~~~~~^~~~
/usr/local/opt/musl/include/math.h:90:63: note: expanded from macro
'isunordered'
#define isunordered(x,y) (isnan((x)) ? ((void)(y),1) : isnan((y)))
^
/usr/local/opt/musl/include/math.h:68:47: note: expanded from macro 'isnan'
sizeof(x) == sizeof(double) ? (__DOUBLE_BITS(x) & -1ULL>>1) >
0x7ffULL<<52 : \
^
/usr/local/opt/musl/include/math.h:100:1: error: implicit conversion loses
floating-point precision: 'double_t' (aka 'double') to 'float'
[-Werror,-Wconversion]
__ISREL_DEF(lessequal, <=, double_t)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/opt/musl/include/math.h:94:23: note: expanded from macro
'__ISREL_DEF'
{ return !isunordered(__x,__y) && __x op __y; }
~~~~~~~~~~~~^~~~~~~~
/usr/local/opt/musl/include/math.h:90:34: note: expanded from macro
'isunordered'
#define isunordered(x,y) (isnan((x)) ? ((void)(y),1) : isnan((y)))
^
/usr/local/opt/musl/include/math.h:67:45: note: expanded from macro 'isnan'
sizeof(x) == sizeof(float) ? (__FLOAT_BITS(x) & 0x7fffffff) >
0x7f800000 : \
^
/usr/local/opt/musl/include/math.h:100:1: error: implicit conversion loses
floating-point precision: 'double_t' (aka 'double') to 'float'
[-Werror,-Wconversion]
__ISREL_DEF(lessequal, <=, double_t)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/opt/musl/include/math.h:94:27: note: expanded from macro
'__ISREL_DEF'
{ return !isunordered(__x,__y) && __x op __y; }
~~~~~~~~~~~~~~~~^~~~
/usr/local/opt/musl/include/math.h:90:63: note: expanded from macro
'isunordered'
#define isunordered(x,y) (isnan((x)) ? ((void)(y),1) : isnan((y)))
^
/usr/local/opt/musl/include/math.h:67:45: note: expanded from macro 'isnan'
sizeof(x) == sizeof(float) ? (__FLOAT_BITS(x) & 0x7fffffff) >
0x7f800000 : \
^
/usr/local/opt/musl/include/math.h:101:1: error: implicit conversion loses
floating-point precision: 'long double' to 'float' [-Werror,-Wconversion]
__ISREL_DEF(lessequall, <=, long double)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/opt/musl/include/math.h:94:23: note: expanded from macro
'__ISREL_DEF'
{ return !isunordered(__x,__y) && __x op __y; }
~~~~~~~~~~~~^~~~~~~~
/usr/local/opt/musl/include/math.h:90:34: note: expanded from macro
'isunordered'
#define isunordered(x,y) (isnan((x)) ? ((void)(y),1) : isnan((y)))
^
/usr/local/opt/musl/include/math.h:67:45: note: expanded from macro 'isnan'
sizeof(x) == sizeof(float) ? (__FLOAT_BITS(x) & 0x7fffffff) >
0x7f800000 : \
^
/usr/local/opt/musl/include/math.h:101:1: error: implicit conversion loses
floating-point precision: 'long double' to 'double' [-Werror,-Wconversion]
__ISREL_DEF(lessequall, <=, long double)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/opt/musl/include/math.h:94:23: note: expanded from macro
'__ISREL_DEF'
{ return !isunordered(__x,__y) && __x op __y; }
~~~~~~~~~~~~^~~~~~~~
/usr/local/opt/musl/include/math.h:90:34: note: expanded from macro
'isunordered'
#define isunordered(x,y) (isnan((x)) ? ((void)(y),1) : isnan((y)))
^
/usr/local/opt/musl/include/math.h:68:47: note: expanded from macro 'isnan'
sizeof(x) == sizeof(double) ? (__DOUBLE_BITS(x) & -1ULL>>1) >
0x7ffULL<<52 : \
^
/usr/local/opt/musl/include/math.h:101:1: error: implicit conversion loses
floating-point precision: 'long double' to 'float' [-Werror,-Wconversion]
__ISREL_DEF(lessequall, <=, long double)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/opt/musl/include/math.h:94:27: note: expanded from macro
'__ISREL_DEF'
{ return !isunordered(__x,__y) && __x op __y; }
~~~~~~~~~~~~~~~~^~~~
/usr/local/opt/musl/include/math.h:90:63: note: expanded from macro
'isunordered'
#define isunordered(x,y) (isnan((x)) ? ((void)(y),1) : isnan((y)))
^
/usr/local/opt/musl/include/math.h:67:45: note: expanded from macro 'isnan'
sizeof(x) == sizeof(float) ? (__FLOAT_BITS(x) & 0x7fffffff) >
0x7f800000 : \
^
/usr/local/opt/musl/include/math.h:101:1: error: implicit conversion loses
floating-point precision: 'long double' to 'double' [-Werror,-Wconversion]
__ISREL_DEF(lessequall, <=, long double)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/opt/musl/include/math.h:94:27: note: expanded from macro
'__ISREL_DEF'
{ return !isunordered(__x,__y) && __x op __y; }
~~~~~~~~~~~~~~~~^~~~
/usr/local/opt/musl/include/math.h:90:63: note: expanded from macro
'isunordered'
#define isunordered(x,y) (isnan((x)) ? ((void)(y),1) : isnan((y)))
^
/usr/local/opt/musl/include/math.h:68:47: note: expanded from macro 'isnan'
sizeof(x) == sizeof(double) ? (__DOUBLE_BITS(x) & -1ULL>>1) >
0x7ffULL<<52 : \
^
/usr/local/opt/musl/include/math.h:103:1: error: implicit conversion loses
floating-point precision: 'double_t' (aka 'double') to 'float'
[-Werror,-Wconversion]
__ISREL_DEF(lessgreater, !=, double_t)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/opt/musl/include/math.h:94:23: note: expanded from macro
'__ISREL_DEF'
{ return !isunordered(__x,__y) && __x op __y; }
~~~~~~~~~~~~^~~~~~~~
/usr/local/opt/musl/include/math.h:90:34: note: expanded from macro
'isunordered'
#define isunordered(x,y) (isnan((x)) ? ((void)(y),1) : isnan((y)))
^
/usr/local/opt/musl/include/math.h:67:45: note: expanded from macro 'isnan'
sizeof(x) == sizeof(float) ? (__FLOAT_BITS(x) & 0x7fffffff) >
0x7f800000 : \
^
/usr/local/opt/musl/include/math.h:103:1: error: implicit conversion loses
floating-point precision: 'double_t' (aka 'double') to 'float'
[-Werror,-Wconversion]
__ISREL_DEF(lessgreater, !=, double_t)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/opt/musl/include/math.h:94:27: note: expanded from macro
'__ISREL_DEF'
{ return !isunordered(__x,__y) && __x op __y; }
~~~~~~~~~~~~~~~~^~~~
/usr/local/opt/musl/include/math.h:90:63: note: expanded from macro
'isunordered'
#define isunordered(x,y) (isnan((x)) ? ((void)(y),1) : isnan((y)))
^
/usr/local/opt/musl/include/math.h:67:45: note: expanded from macro 'isnan'
sizeof(x) == sizeof(float) ? (__FLOAT_BITS(x) & 0x7fffffff) >
0x7f800000 : \
^
/usr/local/opt/musl/include/math.h:104:1: error: implicit conversion loses
floating-point precision: 'long double' to 'float' [-Werror,-Wconversion]
__ISREL_DEF(lessgreaterl, !=, long double)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/opt/musl/include/math.h:94:23: note: expanded from macro
'__ISREL_DEF'
{ return !isunordered(__x,__y) && __x op __y; }
~~~~~~~~~~~~^~~~~~~~
/usr/local/opt/musl/include/math.h:90:34: note: expanded from macro
'isunordered'
#define isunordered(x,y) (isnan((x)) ? ((void)(y),1) : isnan((y)))
^
/usr/local/opt/musl/include/math.h:67:45: note: expanded from macro 'isnan'
sizeof(x) == sizeof(float) ? (__FLOAT_BITS(x) & 0x7fffffff) >
0x7f800000 : \
^
/usr/local/opt/musl/include/math.h:104:1: error: implicit conversion loses
floating-point precision: 'long double' to 'double' [-Werror,-Wconversion]
__ISREL_DEF(lessgreaterl, !=, long double)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/opt/musl/include/math.h:94:23: note: expanded from macro
'__ISREL_DEF'
{ return !isunordered(__x,__y) && __x op __y; }
~~~~~~~~~~~~^~~~~~~~
/usr/local/opt/musl/include/math.h:90:34: note: expanded from macro
'isunordered'
#define isunordered(x,y) (isnan((x)) ? ((void)(y),1) : isnan((y)))
^
/usr/local/opt/musl/include/math.h:68:47: note: expanded from macro 'isnan'
sizeof(x) == sizeof(double) ? (__DOUBLE_BITS(x) & -1ULL>>1) >
0x7ffULL<<52 : \
^
/usr/local/opt/musl/include/math.h:104:1: error: implicit conversion loses
floating-point precision: 'long double' to 'float' [-Werror,-Wconversion]
__ISREL_DEF(lessgreaterl, !=, long double)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/opt/musl/include/math.h:94:27: note: expanded from macro
'__ISREL_DEF'
{ return !isunordered(__x,__y) && __x op __y; }
~~~~~~~~~~~~~~~~^~~~
/usr/local/opt/musl/include/math.h:90:63: note: expanded from macro
'isunordered'
#define isunordered(x,y) (isnan((x)) ? ((void)(y),1) : isnan((y)))
^
/usr/local/opt/musl/include/math.h:67:45: note: expanded from macro 'isnan'
sizeof(x) == sizeof(float) ? (__FLOAT_BITS(x) & 0x7fffffff) >
0x7f800000 : \
^
/usr/local/opt/musl/include/math.h:104:1: error: implicit conversion loses
floating-point precision: 'long double' to 'double' [-Werror,-Wconversion]
__ISREL_DEF(lessgreaterl, !=, long double)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/opt/musl/include/math.h:94:27: note: expanded from macro
'__ISREL_DEF'
{ return !isunordered(__x,__y) && __x op __y; }
~~~~~~~~~~~~~~~~^~~~
/usr/local/opt/musl/include/math.h:90:63: note: expanded from macro
'isunordered'
#define isunordered(x,y) (isnan((x)) ? ((void)(y),1) : isnan((y)))
^
/usr/local/opt/musl/include/math.h:68:47: note: expanded from macro 'isnan'
sizeof(x) == sizeof(double) ? (__DOUBLE_BITS(x) & -1ULL>>1) >
0x7ffULL<<52 : \
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
[-- Attachment #2: Type: text/html, Size: 19232 bytes --]
next reply other threads:[~2014-07-05 11:25 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-05 11:25 Vasyl Vavrychuk [this message]
2014-07-05 12:43 ` Rich Felker
2014-07-05 19:06 ` Vasyl Vavrychuk
2014-07-07 17:21 ` Szabolcs Nagy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAGj4m+7SuXBQQS0TrmqO0eKH7myxUXF9G=bfjhxpeJMNGbyxJw@mail.gmail.com' \
--to=vvavrychuk@gmail.com \
--cc=musl@lists.openwall.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/musl/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).