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.17-601-ga7548d4


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  a7548d41a7459ff85a751ae84b4bd77631833473 (commit)
      from  cc0e6ed81fa3ab0eeecfc576098b4522f0323c4b (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=a7548d41a7459ff85a751ae84b4bd77631833473

commit a7548d41a7459ff85a751ae84b4bd77631833473
Author: Joseph Myers <joseph@codesourcery.com>
Date:   Sat May 4 13:08:34 2013 +0000

    Use static initializers for constant variables in libm-test.inc.

diff --git a/ChangeLog b/ChangeLog
index fac3208..91cfb62 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2013-05-04  Joseph Myers  <joseph@codesourcery.com>
+
+	* math/libm-test.inc (plus_zero): Make const.  Add initializer.
+	(minus_zero): Likewise.
+	(plus_infty): Likewise.
+	(minus_infty): Likewise.
+	(qnan_value): Likewise.
+	(max_value): Likewise.
+	(min_value): Likewise.
+	(min_subnorm_value): Likewise.
+	(initialize): Do not initialize those variables dynamically.
+
 2013-05-03  Roland McGrath  <roland@hack.frob.com>
 
 	* io/open.c (__open_2): Moved to ...
diff --git a/math/libm-test.inc b/math/libm-test.inc
index 7597547..c58bd45 100644
--- a/math/libm-test.inc
+++ b/math/libm-test.inc
@@ -231,9 +231,25 @@ static int output_max_error;	/* Should the maximal errors printed?  */
 static int output_points;	/* Should the single function results printed?  */
 static int ignore_max_ulp;	/* Should we ignore max_ulp?  */
 
-static FLOAT minus_zero, plus_zero;
-static FLOAT plus_infty, minus_infty, qnan_value, max_value, min_value;
-static FLOAT min_subnorm_value;
+static const FLOAT plus_zero = CHOOSE (0.0L, 0.0, 0.0f,
+				       0.0L, 0.0, 0.0f);
+static const FLOAT minus_zero = CHOOSE (-0.0L, -0.0, -0.0f,
+					-0.0L, -0.0, -0.0f);
+static const FLOAT plus_infty = CHOOSE (HUGE_VALL, HUGE_VAL, HUGE_VALF,
+					HUGE_VALL, HUGE_VAL, HUGE_VALF);
+static const FLOAT minus_infty = CHOOSE (-HUGE_VALL, -HUGE_VAL, -HUGE_VALF,
+					 -HUGE_VALL, -HUGE_VAL, -HUGE_VALF);
+static const FLOAT qnan_value = FUNC (__builtin_nan) ("");
+static const FLOAT max_value = CHOOSE (LDBL_MAX, DBL_MAX, FLT_MAX,
+				       LDBL_MAX, DBL_MAX, FLT_MAX);
+static const FLOAT min_value = CHOOSE (LDBL_MIN, DBL_MIN, FLT_MIN,
+				       LDBL_MIN, DBL_MIN, FLT_MIN);
+static const FLOAT min_subnorm_value = CHOOSE (__LDBL_DENORM_MIN__,
+					       __DBL_DENORM_MIN__,
+					       __FLT_DENORM_MIN__,
+					       __LDBL_DENORM_MIN__,
+					       __DBL_DENORM_MIN__,
+					       __FLT_DENORM_MIN__);
 
 static FLOAT max_error, real_max_error, imag_max_error;
 
@@ -13814,33 +13830,6 @@ initialize (void)
 {
   fpstack_test ("start *init*");
 
-  plus_zero = 0.0;
-  qnan_value = FUNC (__builtin_nan) ("");
-  minus_zero = FUNC (copysign) (0.0, -1.0);
-  plus_infty = CHOOSE (HUGE_VALL, HUGE_VAL, HUGE_VALF,
-		       HUGE_VALL, HUGE_VAL, HUGE_VALF);
-  minus_infty = CHOOSE (-HUGE_VALL, -HUGE_VAL, -HUGE_VALF,
-			-HUGE_VALL, -HUGE_VAL, -HUGE_VALF);
-  max_value = CHOOSE (LDBL_MAX, DBL_MAX, FLT_MAX,
-		      LDBL_MAX, DBL_MAX, FLT_MAX);
-  min_value = CHOOSE (LDBL_MIN, DBL_MIN, FLT_MIN,
-		      LDBL_MIN, DBL_MIN, FLT_MIN);
-  min_subnorm_value = CHOOSE (__LDBL_DENORM_MIN__,
-			      __DBL_DENORM_MIN__,
-			      __FLT_DENORM_MIN__,
-			      __LDBL_DENORM_MIN__,
-			      __DBL_DENORM_MIN__,
-			      __FLT_DENORM_MIN__);
-
-  (void) &plus_zero;
-  (void) &qnan_value;
-  (void) &minus_zero;
-  (void) &plus_infty;
-  (void) &minus_infty;
-  (void) &max_value;
-  (void) &min_value;
-  (void) &min_subnorm_value;
-
   /* Clear all exceptions.  From now on we must not get random exceptions.  */
   feclearexcept (FE_ALL_EXCEPT);
   errno = 0;

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

Summary of changes:
 ChangeLog          |   12 ++++++++++++
 math/libm-test.inc |   49 +++++++++++++++++++------------------------------
 2 files changed, 31 insertions(+), 30 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]