glibc/sysdeps/ieee754
Martin Jansa 27c5e756a2 sysdeps/ieee754: prevent maybe-uninitialized errors with -O [BZ #19444]
With -O included in CFLAGS it fails to build with:

../sysdeps/ieee754/ldbl-96/e_jnl.c: In function '__ieee754_jnl':
../sysdeps/ieee754/ldbl-96/e_jnl.c:146:20: error: 'temp' may be used uninitialized in this function [-Werror=maybe-uninitialized]
      b = invsqrtpi * temp / sqrtl (x);
          ~~~~~~~~~~^~~~~~
../sysdeps/ieee754/ldbl-96/e_jnl.c: In function '__ieee754_ynl':
../sysdeps/ieee754/ldbl-96/e_jnl.c:375:16: error: 'temp' may be used uninitialized in this function [-Werror=maybe-uninitialized]
  b = invsqrtpi * temp / sqrtl (x);
      ~~~~~~~~~~^~~~~~
../sysdeps/ieee754/dbl-64/e_jn.c: In function '__ieee754_jn':
../sysdeps/ieee754/dbl-64/e_jn.c:113:20: error: 'temp' may be used uninitialized in this function [-Werror=maybe-uninitialized]
      b = invsqrtpi * temp / sqrt (x);
          ~~~~~~~~~~^~~~~~
../sysdeps/ieee754/dbl-64/e_jn.c: In function '__ieee754_yn':
../sysdeps/ieee754/dbl-64/e_jn.c:320:16: error: 'temp' may be used uninitialized in this function [-Werror=maybe-uninitialized]
  b = invsqrtpi * temp / sqrt (x);
      ~~~~~~~~~~^~~~~~

Build tested with Yocto for ARM, AARCH64, X86, X86_64, PPC, MIPS, MIPS64
with -O, -O1, -Os.
For AARCH64 it needs one more fix in locale for -Os:
https://sourceware.org/ml/libc-alpha/2018-09/msg00539.html

	[BZ #19444]
	* sysdeps/ieee754/dbl-64/e_jn.c (__ieee754_jn): Use
	__builtin_unreachable for default case in switch.
	(__ieee754_yn): Likewise.
	* sysdeps/ieee754/ldbl-96/e_jnl.c (__ieee754_jnl): Likewise.
	(__ieee754_ynl): Likewise.
	* sysdeps/ieee754/ldbl-128/e_jnl.c (__ieee754_jnl): Likewise.
	(__ieee754_ynl): Likewise.
	* sysdeps/ieee754/ldbl-128ibm/e_jnl.c (__ieee754_jnl): Likewise.
	(__ieee754_ynl): Likewise.
2019-01-04 16:17:48 +00:00
..
dbl-64 sysdeps/ieee754: prevent maybe-uninitialized errors with -O [BZ #19444] 2019-01-04 16:17:48 +00:00
float128 Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
flt-32 Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
ldbl-64-128 Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
ldbl-96 sysdeps/ieee754: prevent maybe-uninitialized errors with -O [BZ #19444] 2019-01-04 16:17:48 +00:00
ldbl-128 sysdeps/ieee754: prevent maybe-uninitialized errors with -O [BZ #19444] 2019-01-04 16:17:48 +00:00
ldbl-128ibm sysdeps/ieee754: prevent maybe-uninitialized errors with -O [BZ #19444] 2019-01-04 16:17:48 +00:00
ldbl-128ibm-compat Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
ldbl-opt Use C99-compliant scanf under _GNU_SOURCE with modern compilers. 2019-01-03 11:12:39 -05:00
soft-fp Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
Makefile
ieee754.h Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
k_standard.c Use copysign functions not __copysign functions in glibc libm. 2018-09-27 20:04:48 +00:00
k_standardf.c Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
k_standardl.c Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +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 Remove unnecessary math_private.h includes. 2018-09-28 21:53:33 +00:00