From: Szabolcs Nagy Date: Sun, 9 Mar 2014 18:29:41 +0000 (+0100) Subject: math.h: make __FLOAT_BITS and __DOUBLE_BITS C89 X-Git-Tag: v1.0.0~24 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=6739b13a172aad9c01572c04cadacc99c7041811;p=oweals%2Fmusl.git math.h: make __FLOAT_BITS and __DOUBLE_BITS C89 Remove non-constant aggregate initializer. (Still using long long, but that is supported by ancient compilers without __extension__ anyway). --- diff --git a/include/math.h b/include/math.h index bbee62e2..6ac91da2 100644 --- a/include/math.h +++ b/include/math.h @@ -42,12 +42,14 @@ int __fpclassifyl(long double); static __inline unsigned __FLOAT_BITS(float __f) { - union {float __f; unsigned __i;} __u = {__f}; + union {float __f; unsigned __i;} __u; + __u.__f = __f; return __u.__i; } static __inline unsigned long long __DOUBLE_BITS(double __f) { - union {double __f; unsigned long long __i;} __u = {__f}; + union {double __f; unsigned long long __i;} __u; + __u.__f = __f; return __u.__i; }