From 86ec486597056f93ebc215fc6a7f3bf5431d91f1 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Fri, 3 Nov 2017 21:11:50 +0000 Subject: Handle more _FloatN, _FloatNx types in tgmath.h. Continuing the preparation for additional _FloatN / _FloatNx type support, this patch improves how handles such types. Use of #error is added for cases of distinct types that are not supported by the header, to indicate that additional work on the header would be needed if, for example, _Float16 support were added to glibc. Given that #error, types with the same format as other types are handled automatically by the sizeof-based logic, so the only case needing special handling is that where _Float64x exists, has the same format as _Float128, does not have the same format as long double, and is not a typedef for _Float128. In this case (which will apply for powerpc64le once _Float64x support is added to glibc), the __builtin_types_compatible_p calls testing for _Float128 need corresponding calls testing for _Float64x, which this patch adds. Tested for x86_64. * math/tgmath.h [__HAVE_DISTINCT_FLOAT16 || __HAVE_DISTINCT_FLOAT32 || __HAVE_DISTINCT_FLOAT64 || __HAVE_DISTINCT_FLOAT32X || __HAVE_DISTINCT_FLOAT64X || __HAVE_DISTINCT_FLOAT128X]: Use #error. [__HAVE_DISTINCT_FLOAT128 && __GLIBC_USE (IEC_60559_TYPES_EXT) && __HAVE_FLOAT64X && !__HAVE_FLOAT64X_LONG_DOUBLE && __HAVE_FLOATN_NOT_TYPEDEF] (__TGMATH_F128): Handle _Float64x the same as _Float128. [__HAVE_DISTINCT_FLOAT128 && __GLIBC_USE (IEC_60559_TYPES_EXT) && __HAVE_FLOAT64X && !__HAVE_FLOAT64X_LONG_DOUBLE && __HAVE_FLOATN_NOT_TYPEDEF] (__TGMATH_CF128): Likewise. --- ChangeLog | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'ChangeLog') diff --git a/ChangeLog b/ChangeLog index aa115b62fa..e8913ba3db 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,17 @@ 2017-11-03 Joseph Myers + * math/tgmath.h [__HAVE_DISTINCT_FLOAT16 + || __HAVE_DISTINCT_FLOAT32 || __HAVE_DISTINCT_FLOAT64 + || __HAVE_DISTINCT_FLOAT32X || __HAVE_DISTINCT_FLOAT64X + || __HAVE_DISTINCT_FLOAT128X]: Use #error. + [__HAVE_DISTINCT_FLOAT128 && __GLIBC_USE (IEC_60559_TYPES_EXT) + && __HAVE_FLOAT64X && !__HAVE_FLOAT64X_LONG_DOUBLE + && __HAVE_FLOATN_NOT_TYPEDEF] (__TGMATH_F128): Handle _Float64x + the same as _Float128. + [__HAVE_DISTINCT_FLOAT128 && __GLIBC_USE (IEC_60559_TYPES_EXT) + && __HAVE_FLOAT64X && !__HAVE_FLOAT64X_LONG_DOUBLE + && __HAVE_FLOATN_NOT_TYPEDEF] (__TGMATH_CF128): Likewise. + * stdlib/stdlib.h [__HAVE_FLOAT16 && __GLIBC_USE (IEC_60559_TYPES_EXT)] (strtof16): Declare. -- cgit 1.4.1