glibc/sysdeps/ieee754
Joseph Myers 9173e3c0b4 Fix uninitialized variable use in ldbl-128ibm nearbyintl.
Removing the use of -Wno-uninitialized for math/ shows errors for
ldbl-128ibm:

../sysdeps/ieee754/ldbl-128ibm/s_nearbyintl.c: In function '__nearbyintl':
../sysdeps/ieee754/ldbl-128ibm/s_nearbyintl.c:119:34: error: 'low' may be used uninitialized in this function [-Werror=maybe-uninitialized]
       u.d[1].d = high - u.d[0].d + low;
                                  ^
../sysdeps/ieee754/ldbl-128ibm/s_nearbyintl.c:119:23: error: 'high' may be used uninitialized in this function [-Werror=maybe-uninitialized]
       u.d[1].d = high - u.d[0].d + low;
                       ^

These errors are correct: if the high part of the argument is a NaN,
and the low part is nonzero but has absolute value less than 2^52,
those variables can be used uninitialized.  This patch rearranges the
code so that the variables are always initialized with the natural
values, and then possibly modified later, to avoid this uninitialized
use.  (Note that there are still other issues with this code and NaNs
that are not fixed by this patch.)  No bug filed in Bugzilla or
testcase added for the uninitialized use since it wasn't user-visible
with the compiler I tried (that is, I still got a NaN result).

Tested for powerpc.

	* sysdeps/ieee754/ldbl-128ibm/s_nearbyintl.c: Always initialize
	variables for high and low parts before possibly modifying them.
2015-08-20 17:28:09 +00:00
..
bits Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
dbl-64 Fix fma spurious underflows (bug 18824). 2015-08-14 17:15:06 +00:00
flt-32 Fix tanh missing underflows (bug 16520). 2015-08-13 16:40:39 +00:00
ldbl-64-128 Set errno for log1p on pole/domain error. 2015-04-13 21:19:27 +02:00
ldbl-96 Fix fma spurious underflows (bug 18824). 2015-08-14 17:15:06 +00:00
ldbl-128 Fix fma spurious underflows (bug 18824). 2015-08-14 17:15:06 +00:00
ldbl-128ibm Fix uninitialized variable use in ldbl-128ibm nearbyintl. 2015-08-20 17:28:09 +00:00
ldbl-opt Fixed powerpc64 build. 2015-06-19 20:42:34 +03:00
ieee754.h Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
k_standard.c Add comment to CSTR macro in k_standard.c. 2015-02-27 01:12:19 +00:00
k_standardf.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
k_standardl.c Fix spurious "inexact" exceptions from __kernel_standard_l (bug 18245, bug 18583). 2015-06-23 17:26:46 +00:00
Makefile Avoid -Wno-write-strings for k_standard.c. 2015-02-26 22:50:54 +00:00
s_lib_version.c Remove trailing whitespace. 2013-06-05 20:44:03 +00:00
s_matherr.c Use <> for math.h and math_private.h everywhere. 2012-03-09 16:09:10 -08:00
s_signgam.c Use <> for math.h and math_private.h everywhere. 2012-03-09 16:09:10 -08:00