This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug math/16296] fegetround is pure?


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]