diff options
author | Rich Felker <dalias@aerifal.cx> | 2012-03-17 21:40:10 -0400 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2012-03-17 21:40:10 -0400 |
commit | 65db6bf5ea1f27ec2cddd6423868baeff05cc719 (patch) | |
tree | 1fdaf1532ffbf408e4452ec1a930566d645916b8 /include | |
parent | da0acc32efc85a91c4225157d22520743c6d8f8c (diff) | |
download | musl-65db6bf5ea1f27ec2cddd6423868baeff05cc719.tar.gz musl-65db6bf5ea1f27ec2cddd6423868baeff05cc719.tar.bz2 musl-65db6bf5ea1f27ec2cddd6423868baeff05cc719.tar.xz musl-65db6bf5ea1f27ec2cddd6423868baeff05cc719.zip |
c++ seems to want some casts in the float representation-access macros
Diffstat (limited to 'include')
-rw-r--r-- | include/math.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/math.h b/include/math.h index 9c06c967..ec4afa78 100644 --- a/include/math.h +++ b/include/math.h @@ -41,8 +41,8 @@ int __fpclassify(double); int __fpclassifyf(float); int __fpclassifyl(long double); -#define __FLOAT_BITS(f) (((union { float __f; __uint32_t __i; }){ (f) }).__i) -#define __DOUBLE_BITS(f) (((union { double __f; __uint64_t __i; }){ (f) }).__i) +#define __FLOAT_BITS(f) (((union { float __f; __uint32_t __i; }){ (float)(f) }).__i) +#define __DOUBLE_BITS(f) (((union { double __f; __uint64_t __i; }){ (double)(f) }).__i) #define fpclassify(x) ( \ sizeof(x) == sizeof(float) ? __fpclassifyf(x) : \ |