From f7787234964031bb642bfeb43a31292e1769b56c Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Tue, 5 Dec 2017 21:52:15 +0000 Subject: Use long double not double for _Float64 with old GCC if values the same. If double, long double and _Float64 all have the same set of values, TS 18661-3 requires the usual arithmetic conversions on long double and _Float64 to produce _Float64. For this to be the case when building with a compiler without a distinct _Float64 type, _Float64 must be a typedef for long double, not for double. (_Float32x, however, must be double in such a case, not long double, because the usual arithmetic conversions on _Float32x and double must produce double.) This patch adjusts the fallback definition of _Float64 and associated macros accordingly in that case, to fix the build of test-tgmath3 with GCC 6 for such a configuration. Tested in conjunction with _Float64 changes with build-many-glibcs.py for arm-linux-gnueabi, to make sure the issue with test-tgmath3 is fixed. Also tested for x86_64. * bits/floatn-common.h: Include . [__HAVE_FLOAT64 && (!__GNUC_PREREQ (7, 0) || defined __cplusplus) && __NO_LONG_DOUBLE_MATH] (__f64): Use suffix 'l'. [__HAVE_FLOAT64 && (!__GNUC_PREREQ (7, 0) || defined __cplusplus) && __NO_LONG_DOUBLE_MATH] (__CFLOAT64): Use _Complex long double. [__HAVE_FLOAT64 && (!__GNUC_PREREQ (7, 0) || defined __cplusplus) && __NO_LONG_DOUBLE_MATH] (_Float64): Use long double. [__HAVE_FLOAT64 && !__GNUC_PREREQ (7, 0) && __NO_LONG_DOUBLE_MATH] (__builtin_huge_valf64): Use __builtin_huge_vall. [__HAVE_FLOAT64 && !__GNUC_PREREQ (7, 0) && __NO_LONG_DOUBLE_MATH] (__builtin_inff64): Use __builtin_infl. [__HAVE_FLOAT64 && !__GNUC_PREREQ (7, 0) && __NO_LONG_DOUBLE_MATH] (__builtin_nanf64): Use __builtin_nanl. [__HAVE_FLOAT64 && !__GNUC_PREREQ (7, 0) && __NO_LONG_DOUBLE_MATH] (__builtin_nansf64): Use __builtin_nansl. --- ChangeLog | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'ChangeLog') diff --git a/ChangeLog b/ChangeLog index 98ae6ac712..9fee1a17c3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,21 @@ +2017-12-05 Joseph Myers + + * bits/floatn-common.h: Include . + [__HAVE_FLOAT64 && (!__GNUC_PREREQ (7, 0) || defined __cplusplus) + && __NO_LONG_DOUBLE_MATH] (__f64): Use suffix 'l'. + [__HAVE_FLOAT64 && (!__GNUC_PREREQ (7, 0) || defined __cplusplus) + && __NO_LONG_DOUBLE_MATH] (__CFLOAT64): Use _Complex long double. + [__HAVE_FLOAT64 && (!__GNUC_PREREQ (7, 0) || defined __cplusplus) + && __NO_LONG_DOUBLE_MATH] (_Float64): Use long double. + [__HAVE_FLOAT64 && !__GNUC_PREREQ (7, 0) && __NO_LONG_DOUBLE_MATH] + (__builtin_huge_valf64): Use __builtin_huge_vall. + [__HAVE_FLOAT64 && !__GNUC_PREREQ (7, 0) && __NO_LONG_DOUBLE_MATH] + (__builtin_inff64): Use __builtin_infl. + [__HAVE_FLOAT64 && !__GNUC_PREREQ (7, 0) && __NO_LONG_DOUBLE_MATH] + (__builtin_nanf64): Use __builtin_nanl. + [__HAVE_FLOAT64 && !__GNUC_PREREQ (7, 0) && __NO_LONG_DOUBLE_MATH] + (__builtin_nansf64): Use __builtin_nansl. + 2017-12-05 Rogerio A. Cardoso , Paul E. Murphy , Carlos O'Donnell -- cgit v1.2.3