diff options
author | Joseph Myers <joseph@codesourcery.com> | 2018-05-22 16:55:04 +0000 |
---|---|---|
committer | Joseph Myers <joseph@codesourcery.com> | 2018-05-22 16:55:04 +0000 |
commit | 3d6302a5467035077ecfe02cdb73d3d467a9e004 (patch) | |
tree | 64a256575c4e05be204e64efc51e55aacb9dc548 /sysdeps/sh/ldsodefs.h | |
parent | 5c5c0dd747070db624c8e2c43691cec854f114ef (diff) | |
download | glibc-3d6302a5467035077ecfe02cdb73d3d467a9e004.tar.gz glibc-3d6302a5467035077ecfe02cdb73d3d467a9e004.tar.xz glibc-3d6302a5467035077ecfe02cdb73d3d467a9e004.zip |
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.
Diffstat (limited to 'sysdeps/sh/ldsodefs.h')
0 files changed, 0 insertions, 0 deletions