* [PATCH] tile: avoid compiler warning in feraiseexcept() math_private override
@ 2012-05-15 20:42 Chris Metcalf
0 siblings, 0 replies; only message in thread
From: Chris Metcalf @ 2012-05-15 20:42 UTC (permalink / raw)
To: libc-ports
---
Is there a more self-descriptive way to achieve this effect?
I'll go ahead and commit this in a day or two if I don't hear any
better suggestions.
Note that the same problem exists for _FPU_GETCW(cw) in
sysdeps/generic/fpu_control.h, so arguably the same solution should be
used there. I'll propose that as a separate patch if this one
seems acceptable.
ChangeLog.tile | 5 +++++
sysdeps/tile/math_private.h | 5 +++--
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/ChangeLog.tile b/ChangeLog.tile
index 38fec36..3a0a82d 100644
--- a/ChangeLog.tile
+++ b/ChangeLog.tile
@@ -0,0 +1,5 @@
+2012-05-15 Chris Metcalf <cmetcalf@tilera.com>
+
+ * sysdeps/tile/math_private.h (feraiseexcept): Use statement
+ expression syntax to avoid compiler warning.
+
diff --git a/sysdeps/tile/math_private.h b/sysdeps/tile/math_private.h
index 2dab42b..858db4a 100644
--- a/sysdeps/tile/math_private.h
+++ b/sysdeps/tile/math_private.h
@@ -6,7 +6,8 @@
And since we don't define FE_INVALID, FE_DIVBYZERO, etc., we
must ignore the argument of feraiseexcept() as well. we return
"1" to indicate we failed to raise an exception, though none of
- the callers in glibc actually care. */
-#define feraiseexcept(excepts) 1
+ the callers in glibc actually care. The extra level of statement
+ expression wrapping avoids "statement with no effect" warnings. */
+#define feraiseexcept(excepts) ({ 1; })
#endif
--
1.6.5.2
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2012-05-15 20:42 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-15 20:42 [PATCH] tile: avoid compiler warning in feraiseexcept() math_private override Chris Metcalf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).