glibc/sysdeps/ieee754
Joseph Myers 3d6302a546 Fix i686-linux-gnu build with GCC mainline.
Building with recent GCC mainline for i686-linux-gnu is failing with:

../sysdeps/ieee754/flt-32/k_rem_pio2f.c: In function '__kernel_rem_pio2f':
../sysdeps/ieee754/flt-32/k_rem_pio2f.c:186:28: error: 'fq[0]' may be used uninitialized in this function [-Werror=maybe-uninitialized]
   fv = math_narrow_eval (fq[0]-fv);
                            ^

and

../sysdeps/ieee754/dbl-64/k_rem_pio2.c: In function '__kernel_rem_pio2':
../sysdeps/ieee754/dbl-64/k_rem_pio2.c:333:32: error: 'fq[0]' may be used uninitialized in this function [-Werror=maybe-uninitialized]
       fv = math_narrow_eval (fq[0] - fv);
                                ^

These are similar to -Warray-bounds cases for which the DIAG_* macros
are already used in those files: the array element is in fact always
initialized, but the reasoning that it is depends on another array not
having been all zero at an earlier point, which depends on the
functions not being called with zero arguments.  Thus, this patch uses
DIAG_* to disable -Wmaybe-uninitialized for this code.

(The warning may be i686-specific because of math_narrow_eval somehow
perturbing what the compiler does with this code enough to cause the
warning.  I don't know why it doesn't appear for i686-gnu.)

Tested with build-many-glibcs.py that this fixes the i686 build in
this configuration.

	* sysdeps/ieee754/dbl-64/k_rem_pio2.c (__kernel_rem_pio2): Ignore
	-Wmaybe-uninitialized around access to fq[0].
	* sysdeps/ieee754/flt-32/k_rem_pio2f.c (__kernel_rem_pio2f):
	Likewise.
2018-05-22 16:55:04 +00:00
..
dbl-64 Fix i686-linux-gnu build with GCC mainline. 2018-05-22 16:55:04 +00:00
float128 Add narrowing divide functions. 2018-05-17 00:40:52 +00:00
flt-32 Fix i686-linux-gnu build with GCC mainline. 2018-05-22 16:55:04 +00:00
ldbl-64-128 Don't include math.h/math_private.h in math_ldbl_opt.h. 2018-03-10 15:18:08 -05:00
ldbl-96 Add narrowing divide functions. 2018-05-17 00:40:52 +00:00
ldbl-128 Add narrowing divide functions. 2018-05-17 00:40:52 +00:00
ldbl-128ibm Add narrowing divide functions. 2018-05-17 00:40:52 +00:00
ldbl-opt Add narrowing divide functions. 2018-05-17 00:40:52 +00:00
soft-fp Add narrowing divide functions. 2018-05-17 00:40:52 +00:00
Makefile Avoid -Wno-write-strings for k_standard.c. 2015-02-26 22:50:54 +00:00
ieee754.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
k_standard.c Prefer new libm function wrappers for !LIBM_SVID_COMPAT. 2017-09-05 23:35:55 +00:00
k_standardf.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
k_standardl.c Do not include math-barriers.h in math_private.h. 2018-05-11 15:11:38 +00:00
s_lib_version.c Simplify math-svid-compat code. 2017-08-28 15:19:52 +00:00
s_matherr.c Obsolete matherr, _LIB_VERSION, libieee.a. 2017-08-21 17:45:10 +00:00
s_signgam.c Fix lgamma setting signgam for ISO C (bug 15421). 2015-11-20 22:49:59 +00:00