Get rid of array-bounds warning in __kernel_rem_pio2[f] with gcc 6.1 -O3.
commitb65f0b7b2ecd144800830633a4c2719f11775572
authorStefan Liebler <stli@linux.vnet.ibm.com>
Thu, 18 Aug 2016 10:20:35 +0000 (18 12:20 +0200)
committerStefan Liebler <stli@linux.vnet.ibm.com>
Thu, 18 Aug 2016 10:20:35 +0000 (18 12:20 +0200)
tree6e5717b8d10f8cb14521d8cc3ad859915b6d2d67
parent2c820533c61fed175390bc6058afbbe42d2edc37
Get rid of array-bounds warning in __kernel_rem_pio2[f] with gcc 6.1 -O3.

On s390x I get the following werror when build with gcc 6.1 (or current gcc head) and -O3:
../sysdeps/ieee754/dbl-64/k_rem_pio2.c: In function ‘__kernel_rem_pio2’:
../sysdeps/ieee754/dbl-64/k_rem_pio2.c:254:18: error: array subscript is below array bounds [-Werror=array-bounds]
    for (k = 1; iq[jk - k] == 0; k++)
                ~~^~~~~~~~
I get the same error with sysdeps/ieee754/flt-32/k_rem_pio2f.c.

This patch adds DIAG_* macros around it.

ChangeLog:

* sysdeps/ieee754/dbl-64/k_rem_pio2.c (__kernel_rem_pio2):
Use DIAG_*_NEEDS_COMMENT macro to get rid of array-bounds warning.
* sysdeps/ieee754/flt-32/k_rem_pio2f.c (__kernel_rem_pio2f):
Likewise.
ChangeLog
sysdeps/ieee754/dbl-64/k_rem_pio2.c
sysdeps/ieee754/flt-32/k_rem_pio2f.c