]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Mark fegetround pure (bug 16296).
authorJoseph Myers <joseph@codesourcery.com>
Tue, 15 Sep 2015 20:36:50 +0000 (20:36 +0000)
committerJoseph Myers <joseph@codesourcery.com>
Tue, 15 Sep 2015 20:36:50 +0000 (20:36 +0000)
Bug 16296 notes that fegetround is a pure function and should be
marked as such in fenv.h.  This patch implements that.

Tested for x86_64 and x86 (testsuite, and that installed stripped
shared libraries are unchanged by this patch).

[BZ #16296]
* math/fenv.h (fegetround): Use __attribute_pure__.
* include/fenv.h (__fegetround): Likewise.

ChangeLog
NEWS
include/fenv.h
math/fenv.h

index 56782dd4a74a63051c8e86fccfeaf5553e27396e..fd281993c84fd0d72c5a88c6fe0859fc3118ab01 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2015-09-15  Joseph Myers  <joseph@codesourcery.com>
 
+       [BZ #16296]
+       * math/fenv.h (fegetround): Use __attribute_pure__.
+       * include/fenv.h (__fegetround): Likewise.
+
        [BZ #18595]
        * math/s_ctan.c (__ctan): Force underflow exception for results
        whose real or imaginary part has small absolute value.
diff --git a/NEWS b/NEWS
index 797d717fb421fabe624c16089cffad7abc2d5a6b..b35d5424d38dec55c6c2552d710ccb4acc59472d 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -9,12 +9,12 @@ Version 2.23
 
 * The following bugs are resolved with this release:
 
-  2542, 2543, 2558, 2898, 14341, 14912, 15786, 15918, 16141, 16517, 16519,
-  16520, 16521, 16734, 16973, 16985, 17787, 17905, 18084, 18086, 18240,
-  18265, 18370, 18421, 18480, 18525, 18595, 18610, 18618, 18647, 18661,
-  18674, 18675, 18681, 18757, 18778, 18781, 18787, 18789, 18790, 18795,
-  18796, 18820, 18823, 18824, 18863, 18870, 18873, 18875, 18887, 18921,
-  18952, 18961, 18966.
+  2542, 2543, 2558, 2898, 14341, 14912, 15786, 15918, 16141, 16296, 16517,
+  16519, 16520, 16521, 16734, 16973, 16985, 17787, 17905, 18084, 18086,
+  18240, 18265, 18370, 18421, 18480, 18525, 18595, 18610, 18618, 18647,
+  18661, 18674, 18675, 18681, 18757, 18778, 18781, 18787, 18789, 18790,
+  18795, 18796, 18820, 18823, 18824, 18863, 18870, 18873, 18875, 18887,
+  18921, 18952, 18961, 18966.
 
 * The obsolete header <regexp.h> has been removed.  Programs that require
   this header must be updated to use <regex.h> instead.
index 7070199eced61c542c6ea9f790f60b7e35b02ead..de4d46f8b7f506006022b531a1651f4bcdd7b005 100644 (file)
@@ -13,7 +13,7 @@ extern int __fesetexceptflag (const fexcept_t *__flagp, int __excepts);
 extern int __fegetenv (fenv_t *__envp);
 extern int __fesetenv (const fenv_t *__envp);
 extern int __feupdateenv (const fenv_t *__envp);
-extern __typeof (fegetround) __fegetround;
+extern __typeof (fegetround) __fegetround __attribute_pure__;
 extern __typeof (feholdexcept) __feholdexcept;
 extern __typeof (fesetround) __fesetround;
 
index b80d3c053276809f808d952738849c0f84870475..9d4492f36ca210970b1dec5bb23a8b453d8436c1 100644 (file)
@@ -82,7 +82,7 @@ extern int fetestexcept (int __excepts) __THROW;
 /* Rounding control.  */
 
 /* Get current rounding direction.  */
-extern int fegetround (void) __THROW;
+extern int fegetround (void) __THROW __attribute_pure__;
 
 /* Establish the rounding direction represented by ROUND.  */
 extern int fesetround (int __rounding_direction) __THROW;