aboutsummaryrefslogtreecommitdiff
path: root/lib/libm
diff options
context:
space:
mode:
authorBruce Evans <bde@FreeBSD.org>1994-09-08 11:19:43 +0000
committerBruce Evans <bde@FreeBSD.org>1994-09-08 11:19:43 +0000
commit9ce7bcf332d0ada9537a578f711a0dd0ed21b6eb (patch)
tree1a0a562a9248374da552bb2574dd86a46825e4d3 /lib/libm
parent1b42fe9258eada324671285f1a62e8856f5c459f (diff)
downloadsrc-9ce7bcf332d0ada9537a578f711a0dd0ed21b6eb.tar.gz
src-9ce7bcf332d0ada9537a578f711a0dd0ed21b6eb.zip
Declare huge and tiny as volatile so that gcc doesn't evaluate huge*huge
and tiny*tiny at compile time. The evaluations are supposed to be done at run time to set the IEEE exception flags. Many other source files in libm and msun are missing this fix. Fixing them is not urgent since the default IEEE exception masks don't allow use of the overflow exception flag.
Notes
Notes: svn path=/head/; revision=2576
Diffstat (limited to 'lib/libm')
-rw-r--r--lib/libm/common_source/pow.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/libm/common_source/pow.c b/lib/libm/common_source/pow.c
index 5121f3046421..cb4fc5029f4d 100644
--- a/lib/libm/common_source/pow.c
+++ b/lib/libm/common_source/pow.c
@@ -174,7 +174,8 @@ pow_P(x, y) double x, y;
#endif
{
struct Double s, t, __log__D();
- double __exp__D(), huge = 1e300, tiny = 1e-300;
+ double __exp__D();
+ volatile double huge = 1e300, tiny = 1e-300;
if (x == zero)
if (y > zero)