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.21-395-g0c3717e


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  0c3717e7827969895f6ffe57c66e1612358ce6b1 (commit)
      from  31a8780d0b41934c6ab5160f834f56a2d5d97f4a (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=0c3717e7827969895f6ffe57c66e1612358ce6b1

commit 0c3717e7827969895f6ffe57c66e1612358ce6b1
Author: Joseph Myers <joseph@codesourcery.com>
Date:   Fri May 22 20:13:44 2015 +0000

    Fix ldbl-128 / ldbl-128ibm tanl for -Wuninitialized.
    
    The ldbl-128 and ldbl-128ibm implementations of tanl produce
    uninitialized variable warnings with -Wuninitialized because of a
    variable that is initialized only conditionally, then used under the
    same conditions under which it is set.  This patch uses DIAG_* macros
    to suppress those warnings.
    
    Tested for powerpc and mips64.
    
    	* sysdeps/ieee754/ldbl-128/k_tanl.c: Include <libc-internal.h>.
    	(__kernel_tanl): Ignore uninitialized warnings around use of SIGN.
    	* sysdeps/ieee754/ldbl-128ibm/k_tanl.c: Include <libc-internal.h>.
    	(__kernel_tanl): Ignore uninitialized warnings around use of SIGN.

diff --git a/ChangeLog b/ChangeLog
index 5b31961..159eb4a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2015-05-22  Joseph Myers  <joseph@codesourcery.com>
 
+	* sysdeps/ieee754/ldbl-128/k_tanl.c: Include <libc-internal.h>.
+	(__kernel_tanl): Ignore uninitialized warnings around use of SIGN.
+	* sysdeps/ieee754/ldbl-128ibm/k_tanl.c: Include <libc-internal.h>.
+	(__kernel_tanl): Ignore uninitialized warnings around use of SIGN.
+
 	* sysdeps/ieee754/ldbl-128/s_erfl.c (__erfcl): Make case 9 in
 	switch statement into default case.
 	* sysdeps/ieee754/ldbl-128ibm/s_erfl.c (__erfcl): Likewise.
diff --git a/sysdeps/ieee754/ldbl-128/k_tanl.c b/sysdeps/ieee754/ldbl-128/k_tanl.c
index 140ce95..dfba2d9 100644
--- a/sysdeps/ieee754/ldbl-128/k_tanl.c
+++ b/sysdeps/ieee754/ldbl-128/k_tanl.c
@@ -56,6 +56,7 @@
  *		       = 1 - 2*(tan(y) - (tan(y)^2)/(1+tan(y)))
  */
 
+#include <libc-internal.h>
 #include <math.h>
 #include <math_private.h>
 static const long double
@@ -129,8 +130,19 @@ __kernel_tanl (long double x, long double y, int iy)
     {
       v = (long double) iy;
       w = (v - 2.0 * (x - (w * w / (w + v) - r)));
+      /* SIGN is set for arguments that reach this code, but not
+	 otherwise, resulting in warnings that it may be used
+	 uninitialized although in the cases where it is used it has
+	 always been set.  */
+      DIAG_PUSH_NEEDS_COMMENT;
+#if __GNUC_PREREQ (4, 7)
+      DIAG_IGNORE_NEEDS_COMMENT (5, "-Wmaybe-uninitialized");
+#else
+      DIAG_IGNORE_NEEDS_COMMENT (5, "-Wuninitialized");
+#endif
       if (sign < 0)
 	w = -w;
+      DIAG_POP_NEEDS_COMMENT;
       return w;
     }
   if (iy == 1)
diff --git a/sysdeps/ieee754/ldbl-128ibm/k_tanl.c b/sysdeps/ieee754/ldbl-128ibm/k_tanl.c
index bcf8b5e..7f1caee 100644
--- a/sysdeps/ieee754/ldbl-128ibm/k_tanl.c
+++ b/sysdeps/ieee754/ldbl-128ibm/k_tanl.c
@@ -56,6 +56,7 @@
  *		       = 1 - 2*(tan(y) - (tan(y)^2)/(1+tan(y)))
  */
 
+#include <libc-internal.h>
 #include <math.h>
 #include <math_private.h>
 static const long double
@@ -129,8 +130,19 @@ __kernel_tanl (long double x, long double y, int iy)
     {
       v = (long double) iy;
       w = (v - 2.0 * (x - (w * w / (w + v) - r)));
+      /* SIGN is set for arguments that reach this code, but not
+	 otherwise, resulting in warnings that it may be used
+	 uninitialized although in the cases where it is used it has
+	 always been set.  */
+      DIAG_PUSH_NEEDS_COMMENT;
+#if __GNUC_PREREQ (4, 7)
+      DIAG_IGNORE_NEEDS_COMMENT (5, "-Wmaybe-uninitialized");
+#else
+      DIAG_IGNORE_NEEDS_COMMENT (5, "-Wuninitialized");
+#endif
       if (sign < 0)
 	w = -w;
+      DIAG_POP_NEEDS_COMMENT;
       return w;
     }
   if (iy == 1)

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

Summary of changes:
 ChangeLog                            |    5 +++++
 sysdeps/ieee754/ldbl-128/k_tanl.c    |   12 ++++++++++++
 sysdeps/ieee754/ldbl-128ibm/k_tanl.c |   12 ++++++++++++
 3 files changed, 29 insertions(+), 0 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]