summaryrefslogtreecommitdiff
path: root/perl.h
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2008-04-28 20:41:31 +0000
committerNicholas Clark <nick@ccl4.org>2008-04-28 20:41:31 +0000
commitad3a8c6706bd3a6f37807bfeb97ae631d2828ec9 (patch)
treeab283bd098aaa2176203cee75b2073ebb9f449e1 /perl.h
parent016e9c5695872e5cc33263f9d3b6ddfd18396b11 (diff)
downloadperl-ad3a8c6706bd3a6f37807bfeb97ae631d2828ec9.tar.gz
Cast the result of fpsetmask(0) to (void), as some implementations
expand it via a macro, with a comma expression to calculate the return value, at which point gcc has the gall to warn that an expression calcualted is not used. Blame SCO for having to have fpsetmask(0) in the code to start with. p4raw-id: //depot/perl@33762
Diffstat (limited to 'perl.h')
-rw-r--r--perl.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/perl.h b/perl.h
index 4cd9a2b586..8e48b6d43a 100644
--- a/perl.h
+++ b/perl.h
@@ -2651,7 +2651,11 @@ typedef struct clone_params CLONE_PARAMS;
# if HAS_FLOATINGPOINT_H
# include <floatingpoint.h>
# endif
-# define PERL_FPU_INIT fpsetmask(0)
+/* Some operating systems have this as a macro, which in turn expands to a comma
+ expression, and the last sub-expression is something that gets calculated,
+ and then they have the gall to warn that a value computed is not used. Hence
+ cast to void. */
+# define PERL_FPU_INIT (void)fpsetmask(0)
# else
# if defined(SIGFPE) && defined(SIG_IGN) && !defined(PERL_MICRO)
# define PERL_FPU_INIT PL_sigfpe_saved = (Sighandler_t) signal(SIGFPE, SIG_IGN)