This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug math/16296] fegetround is pure?
- From: "marc.glisse at normalesup dot org" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Fri, 06 Dec 2013 06:26:17 +0000
- Subject: [Bug math/16296] fegetround is pure?
- Auto-submitted: auto-generated
- References: <bug-16296-131 at http dot sourceware dot org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=16296
--- Comment #2 from Marc Glisse <marc.glisse at normalesup dot org> ---
(In reply to Rich Felker from comment #1)
> How do you expect the compiler to know it can't cache the result of
> fegetround across calls to fesetround, fesetenv, etc.?
Uh, the same as for any pure function? The definition of pure is that it only
depends on the arguments and global memory (as opposed to const, which only
depends on the arguments). Any non-pure function call like fesetround clobbers
global memory and the compiler knows that caching becomes invalid then.
--
You are receiving this mail because:
You are on the CC list for the bug.