This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Don't use volatile in exp2f [committed]
- From: Joseph Myers <joseph at codesourcery dot com>
- To: <libc-alpha at sourceware dot org>
- Date: Wed, 23 Sep 2015 22:52:48 +0000
- Subject: Don't use volatile in exp2f [committed]
- Authentication-results: sourceware.org; auth=none
sysdeps/ieee754/flt-32/e_exp2f.c declares two variable as "static
const volatile float". Maybe this use of "volatile" was originally
intended to inhibit optimization of underflowing / overflowing
operations such as TWOM100 * TWOM100; in any case, it's not currently
needed, as given -frounding-math constant folding of such expressions
is properly disabled when it would be unsafe. This patch removes the
unnecessary use of "volatile".
Tested for x86_64. Committed.
2015-09-23 Joseph Myers <joseph@codesourcery.com>
* sysdeps/ieee754/flt-32/e_exp2f.c (TWOM100): Remove volatile.
(TWO127): Likewise.
diff --git a/sysdeps/ieee754/flt-32/e_exp2f.c b/sysdeps/ieee754/flt-32/e_exp2f.c
index d8e7a9c..c053340 100644
--- a/sysdeps/ieee754/flt-32/e_exp2f.c
+++ b/sysdeps/ieee754/flt-32/e_exp2f.c
@@ -37,8 +37,8 @@
#include "t_exp2f.h"
-static const volatile float TWOM100 = 7.88860905e-31;
-static const volatile float TWO127 = 1.7014118346e+38;
+static const float TWOM100 = 7.88860905e-31;
+static const float TWO127 = 1.7014118346e+38;
float
__ieee754_exp2f (float x)
--
Joseph S. Myers
joseph@codesourcery.com