This is the mail archive of the glibc-cvs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

GNU C Library master sources branch master updated. glibc-2.26.9000-933-gf778723


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  f7787234964031bb642bfeb43a31292e1769b56c (commit)
      from  07ed18d26a342741cb25a4739158c65ed9dd4d09 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f7787234964031bb642bfeb43a31292e1769b56c

commit f7787234964031bb642bfeb43a31292e1769b56c
Author: Joseph Myers <joseph@codesourcery.com>
Date:   Tue Dec 5 21:52:15 2017 +0000

    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 <bits/long-double.h>.
    	[__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.

diff --git a/ChangeLog b/ChangeLog
index 98ae6ac..9fee1a1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,21 @@
+2017-12-05  Joseph Myers  <joseph@codesourcery.com>
+
+	* bits/floatn-common.h: Include <bits/long-double.h>.
+	[__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  <rcardoso@linux.vnet.ibm.com>,
 	    Paul E. Murphy  <murphyp@linux.vnet.ibm.com>,
 	    Carlos O'Donnell <carlos@redhat.com>
diff --git a/bits/floatn-common.h b/bits/floatn-common.h
index 4d38a91..aa0a757 100644
--- a/bits/floatn-common.h
+++ b/bits/floatn-common.h
@@ -21,6 +21,7 @@
 #define _BITS_FLOATN_COMMON_H
 
 #include <features.h>
+#include <bits/long-double.h>
 
 /* This header should be included at the bottom of each bits/floatn.h.
    It defines the following macros for each _FloatN and _FloatNx type,
@@ -88,7 +89,11 @@
 
 # if __HAVE_FLOAT64
 #  if !__GNUC_PREREQ (7, 0) || defined __cplusplus
-#   define __f64(x) x
+#   ifdef __NO_LONG_DOUBLE_MATH
+#    define __f64(x) x##l
+#   else
+#    define __f64(x) x
+#   endif
 #  else
 #   define __f64(x) x##f64
 #  endif
@@ -142,7 +147,11 @@ typedef _Complex float __cfloat16 __attribute__ ((__mode__ (__HC__)));
 
 # if __HAVE_FLOAT64
 #  if !__GNUC_PREREQ (7, 0) || defined __cplusplus
-#   define __CFLOAT64 _Complex double
+#   ifdef __NO_LONG_DOUBLE_MATH
+#    define __CFLOAT64 _Complex long double
+#   else
+#    define __CFLOAT64 _Complex double
+#   endif
 #  else
 #   define __CFLOAT64 _Complex _Float64
 #  endif
@@ -209,15 +218,39 @@ typedef float _Float32;
 
 # if __HAVE_FLOAT64
 
-#  if !__GNUC_PREREQ (7, 0) || defined __cplusplus
+/* 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.  */
+
+#  ifdef __NO_LONG_DOUBLE_MATH
+
+#   if !__GNUC_PREREQ (7, 0) || defined __cplusplus
+typedef long double _Float64;
+#   endif
+
+#   if !__GNUC_PREREQ (7, 0)
+#    define __builtin_huge_valf64() (__builtin_huge_vall ())
+#    define __builtin_inff64() (__builtin_infl ())
+#    define __builtin_nanf64(x) (__builtin_nanl (x))
+#    define __builtin_nansf64(x) (__builtin_nansl (x))
+#   endif
+
+#  else
+
+#   if !__GNUC_PREREQ (7, 0) || defined __cplusplus
 typedef double _Float64;
-#  endif
+#   endif
+
+#   if !__GNUC_PREREQ (7, 0)
+#    define __builtin_huge_valf64() (__builtin_huge_val ())
+#    define __builtin_inff64() (__builtin_inf ())
+#    define __builtin_nanf64(x) (__builtin_nan (x))
+#    define __builtin_nansf64(x) (__builtin_nans (x))
+#   endif
 
-#  if !__GNUC_PREREQ (7, 0)
-#   define __builtin_huge_valf64() (__builtin_huge_val ())
-#   define __builtin_inff64() (__builtin_inf ())
-#   define __builtin_nanf64(x) (__builtin_nan (x))
-#   define __builtin_nansf64(x) (__builtin_nans (x))
 #  endif
 
 # endif

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog            |   18 +++++++++++++++++
 bits/floatn-common.h |   51 +++++++++++++++++++++++++++++++++++++++++--------
 2 files changed, 60 insertions(+), 9 deletions(-)


hooks/post-receive
-- 
GNU C Library master sources


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]