This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Use math_narrow_eval more consistently [committed]


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);



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]