diff options
Diffstat (limited to 'libquadmath/gdtoa/strtopQ.c')
-rw-r--r-- | libquadmath/gdtoa/strtopQ.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/libquadmath/gdtoa/strtopQ.c b/libquadmath/gdtoa/strtopQ.c index ed7fb9c8632..0d34c1c0454 100644 --- a/libquadmath/gdtoa/strtopQ.c +++ b/libquadmath/gdtoa/strtopQ.c @@ -49,18 +49,15 @@ THIS SOFTWARE. #define _3 0 #endif - int -#ifdef KR_headers -quadmath_strtopQ(s, sp, V) CONST char *s; char **sp; void *V; -#else -quadmath_strtopQ(CONST char *s, char **sp, void *V) -#endif +__float128 +strtoflt128(CONST char *s, char **sp) { static FPI fpi0 = { 113, 1-16383-113+1, 32766 - 16383 - 113 + 1, 1, SI }; ULong bits[4]; Long exp; int k; - ULong *L = (ULong*)V; + union { __float128 f; ULong L[4]; } u; + ULong *L = &u.L[0]; #ifdef Honor_FLT_ROUNDS #include "gdtoa_fltrnds.h" #else @@ -102,5 +99,5 @@ quadmath_strtopQ(CONST char *s, char **sp, void *V) } if (k & STRTOG_Neg) L[_0] |= 0x80000000L; - return k; - } + return u.f; +} |