Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Sat, 5 Jul 2014 14:25:02 +0300
From: Vasyl Vavrychuk <vvavrychuk@...il.com>
To: musl@...ts.openwall.com
Subject: implicit conversion loses floating-point precision

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

Content of type "text/html" skipped

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.