This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Get rid of array-bounds warning in __kernel_rem_pio2[f] with gcc 6.1 -O3.
- From: Joseph Myers <joseph at codesourcery dot com>
- To: Stefan Liebler <stli at linux dot vnet dot ibm dot com>
- Cc: <libc-alpha at sourceware dot org>
- Date: Wed, 10 Aug 2016 11:38:24 +0000
- Subject: Re: [PATCH] Get rid of array-bounds warning in __kernel_rem_pio2[f] with gcc 6.1 -O3.
- Authentication-results: sourceware.org; auth=none
- References: <577E1156.2030604@linux.vnet.ibm.com> <alpine.DEB.2.20.1607201632100.12251@digraph.polyomino.org.uk> <nn5cpo$pfn$1@ger.gmane.org> <20160801141200.GW6702@vapier.lan> <nnpm3f$iik$1@blaine.gmane.org>
On Tue, 2 Aug 2016, Stefan Liebler wrote:
> diff --git a/sysdeps/ieee754/dbl-64/k_rem_pio2.c b/sysdeps/ieee754/dbl-64/k_rem_pio2.c
> + /* On s390x gcc 6.1 -O3 produces the warning "array subscript is below
> + array bounds [-Werror=array-bounds]". Only __ieee754_rem_pio2l()
> + calls __kernel_rem_pio2f() for normal numbers and |x| > 3pi/4.
__kernel_rem_pio2f seems like the wrong function to reference in a comment
in this file. Please review the actual call sequences in each case to
make sure the right functions are referenced. Also, the GNU Coding
Standards say not to use () after a function name when referencing the
function:
Please do not write @samp{()} after a function name just to indicate
it is a function. @code{foo ()} is not a function, it is a function
call with no arguments.
> + /* On s390x gcc 6.1 -O3 produces the warning "array subscript is
> + below array bounds [-Werror=array-bounds]". Only
> + __ieee754_rem_pio2f() calls __kernel_rem_pio2f() for normal
Likewise, don't use () after the function name.
--
Joseph S. Myers
joseph@codesourcery.com