Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Mark fegetround pure (bug 16296).
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.
  • Loading branch information
Joseph Myers committed Sep 15, 2015
1 parent 0b87419 commit 223d1ca
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 8 deletions.
4 changes: 4 additions & 0 deletions 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.
Expand Down
12 changes: 6 additions & 6 deletions NEWS
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion include/fenv.h
Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion math/fenv.h
Expand Up @@ -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;
Expand Down

0 comments on commit 223d1ca

Please sign in to comment.