https://issues.dlang.org/show_bug.cgi?id=11320
--- Comment #4 from Simon Naarmann <[email protected]> --- D language spec, Pure Functions: https://dlang.org/spec/function.html#pure-functions In Point 8, it says: As a concession to practicality, a pure function can also: * read and write the floating point exception flags * read and write the floating point mode flags, as long as those flags are restored to their initial state upon function entry That's exactly what happens in round(), but through indirection. The compiler will not know that setControlState will be called a second time, and the compiler will not know that setControlState enjoys the special concession of the spec (it looks like any other impure function to the compiler). --
