mailing list of musl libc
 help / color / mirror / code / Atom feed
* implicit conversion loses floating-point precision
@ 2014-07-05 11:25 Vasyl Vavrychuk
  2014-07-05 12:43 ` Rich Felker
  0 siblings, 1 reply; 4+ messages in thread
From: Vasyl Vavrychuk @ 2014-07-05 11:25 UTC (permalink / raw)
  To: musl

[-- 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 --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-07-07 17:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-05 11:25 implicit conversion loses floating-point precision Vasyl Vavrychuk
2014-07-05 12:43 ` Rich Felker
2014-07-05 19:06   ` Vasyl Vavrychuk
2014-07-07 17:21     ` Szabolcs Nagy

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).