<div dir="ltr"><div dir="ltr">On Mon, Apr 14, 2025 Jim Thomas <<a href="mailto:jaswthomas@sbcglobal.net">jaswthomas@sbcglobal.net</a>> wrote:</div><div class="gmail_quote gmail_quote_container"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div>EXAMPLE 3 in 6.7.13.8.3 (in N3467) seems wrong. I understand that if a function is declared with the <font face="Courier New">[[reproducible]]</font> attribute then the compiler can elide repeated calls with the same arguments. But two such calls to the <font face="Courier New">distance</font> function in the example could not be elided if status flags are cleared after the first call and tested after the second. The function can raise “overflow”, “underflow”, and “inexact” floating-point exceptions.<br></div></div></blockquote><div><br></div><div>     Both asking and trying to find a solution, here. Does this mean in addition to the FP_CONTRACT pragma, it needs to also turn off FENV_ACCESS to prevent having access to floating point status flags? Does turning it off inside of a function mean a function cannot change those flags anymore, or does it just mean that the function itself won't access those flags? The former, I think, would solve this problem, but the latter doesn't help for the example I don't believe. (And, fi that is the case, do we then need to look into explicitly asserting that the floating point flags / exceptions are not active?)</div><div><br></div><div>     If we did want to make such a function reproducible, what would you change to make it that way?</div><div><br></div><div>Sincerely,</div><div>JeanHeyd</div></div></div>