This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Use math_narrow_eval more consistently [committed]
- From: Steve Ellcey <sellcey at imgtec dot com>
- To: Joseph Myers <joseph at codesourcery dot com>
- Cc: <libc-alpha at sourceware dot org>
- Date: Thu, 24 Sep 2015 11:00:04 -0700
- Subject: Re: Use math_narrow_eval more consistently [committed]
- Authentication-results: sourceware.org; auth=none
- References: <alpine dot DEB dot 2 dot 10 dot 1509231815300 dot 16441 at digraph dot polyomino dot org dot uk>
- Reply-to: <sellcey at imgtec dot com>
On Wed, 2015-09-23 at 18:16 +0000, Joseph Myers wrote:
>
> Tested for x86_64, x86, mips64 and powerpc. Committed.
>
> 2015-09-23 Joseph Myers <joseph@codesourcery.com>
>
> * math/s_nexttowardf.c (__nexttowardf): Use math_narrow_eval.
> * stdlib/strtod_l.c: Include <math_private.h>.
> (overflow_value): Use math_narrow_eval.
> (underflow_value): Likewise.
Joseph,
This patch is causing a build failure on mips16 hard-float builds. It
dies with:
In file included from strtod_l.c:60:0,
from strtof_l.c:45:
../sysdeps/mips/math_private.h: In function 'libc_fesetenv_mips':
../sysdeps/mips/math_private.h:109:17: error: variable 'cw' set but not
used [-Werror=unused-but-set-variable]
fpu_control_t cw;
^
cc1: all warnings being treated as errors
I have created this patch to fix it, does this look like the right
change to you?
Steve Ellcey
sellcey@imgtec.com
2015-09-24 Steve Ellcey <sellcey@imgtec.com>
* sysdeps/mips/math_private.h (libc_fesetenv_mips): Mark cw as unused.
diff --git a/sysdeps/mips/math_private.h b/sysdeps/mips/math_private.h
index baa5f28..3db0273 100644
--- a/sysdeps/mips/math_private.h
+++ b/sysdeps/mips/math_private.h
@@ -106,7 +106,7 @@ libc_feholdexcept_setround_mips (fenv_t *envp, int round)
static __always_inline void
libc_fesetenv_mips (fenv_t *envp)
{
- fpu_control_t cw;
+ fpu_control_t cw __attribute__ ((unused));
/* Read current state to flush fpu pipeline. */
_FPU_GETCW (cw);