<div dir="ltr"><div>Missing dash corrected at r331057. I can improve the doc wording, but let's settle on the flag name first, and I'll try to get it all fixed up in one shot.<br><br>So far we have these candidates:<br>1. -ffp-cast-overflow-<wbr>workaround<br>2. -fstrict-fp-trunc-semantics<br>3. -fstrict-fp-cast-overflow<br><br></div>I don't have a strong opinion here, but on 2nd reading, it does seem like a 'strict' flag fits better with existing options.<br><div><br> </div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Apr 27, 2018 at 4:41 PM, Richard Smith <span dir="ltr"><<a href="mailto:richard@metafoo.co.uk" target="_blank">richard@metafoo.co.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span class="">On 27 April 2018 at 09:21, Sanjay Patel via cfe-commits <span dir="ltr"><<a href="mailto:cfe-commits@lists.llvm.org" target="_blank">cfe-commits@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: spatel<br>
Date: Fri Apr 27 09:21:22 2018<br>
New Revision: 331056<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=331056&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-pr<wbr>oject?rev=331056&view=rev</a><br>
Log:<br>
[docs] add -ffp-cast-overflow-workaround to the release notes<br>
<br>
This option was added with:<br>
D46135<br>
rL331041<br>
...copying the text from UsersManual.rst for more exposure.<br>
<br>
<br>
Modified:<br>
    cfe/trunk/docs/ReleaseNotes.rs<wbr>t<br>
<br>
Modified: cfe/trunk/docs/ReleaseNotes.rs<wbr>t<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/docs/ReleaseNotes.rst?rev=331056&r1=331055&r2=331056&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-pr<wbr>oject/cfe/trunk/docs/ReleaseNo<wbr>tes.rst?rev=331056&r1=331055&<wbr>r2=331056&view=diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- cfe/trunk/docs/ReleaseNotes.rs<wbr>t (original)<br>
+++ cfe/trunk/docs/ReleaseNotes.rs<wbr>t Fri Apr 27 09:21:22 2018<br>
@@ -83,6 +83,15 @@ Non-comprehensive list of changes in thi<br>
 New Compiler Flags<br>
 ------------------<br>
<br>
+- :option:`-ffp-cast-overflow-wo<wbr>rkaround` and<br>
+  :option:`-fnofp-cast-overflow-<wbr>workaround`<br></blockquote><div><br></div></span><div>Shouldn't this be -fno-fp-cast-overflow-<wbr>workaround?</div><div><br></div><div>Also, our convention for flags that define undefined behavior is `-fno-strict-*`, so perhaps this should be `-fno-strict-fp-cast-overflow`<wbr>?</div><span class=""><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
+  enable (disable) a workaround for code that casts floating-point values to<br>
+  integers and back to floating-point. If the floating-point value is not<br>
+  representable in the intermediate integer type, the code is incorrect<br>
+  according to the language standard.</blockquote><div><br></div></span><div>I find this hard to read: I initially misread "the code is incorrect according to the language standard" as meaning "Clang will generate code that is incorrect according to the language standard". I think what you mean here is "the code has undefined behavior according to the language standard, and Clang will not guarantee any particular result. This flag causes the behavior to be defined to match the overflowing behavior of the target's native float-to-int conversion instructions."</div><span class=""><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">This flag will attempt to generate code<br>
+  as if the result of an overflowing conversion matches the overflowing behavior<br>
+  of a target's native float-to-int conversion instructions.<br>
+<br>
 - ...<br>
<br>
 Deprecated Compiler Flags<br>
<br>
<br>
______________________________<wbr>_________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@lists.llvm.org" target="_blank">cfe-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/cfe-commits</a><br>
</blockquote></span></div><br></div></div>
</blockquote></div><br></div>