r331056 - [docs] add -ffp-cast-overflow-workaround to the release notes

Richard Smith via cfe-commits cfe-commits at lists.llvm.org
Fri Apr 27 15:41:07 PDT 2018


On 27 April 2018 at 09:21, Sanjay Patel via cfe-commits <
cfe-commits at lists.llvm.org> wrote:

> Author: spatel
> Date: Fri Apr 27 09:21:22 2018
> New Revision: 331056
>
> URL: http://llvm.org/viewvc/llvm-project?rev=331056&view=rev
> Log:
> [docs] add -ffp-cast-overflow-workaround to the release notes
>
> This option was added with:
> D46135
> rL331041
> ...copying the text from UsersManual.rst for more exposure.
>
>
> Modified:
>     cfe/trunk/docs/ReleaseNotes.rst
>
> Modified: cfe/trunk/docs/ReleaseNotes.rst
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/docs/
> ReleaseNotes.rst?rev=331056&r1=331055&r2=331056&view=diff
> ============================================================
> ==================
> --- cfe/trunk/docs/ReleaseNotes.rst (original)
> +++ cfe/trunk/docs/ReleaseNotes.rst Fri Apr 27 09:21:22 2018
> @@ -83,6 +83,15 @@ Non-comprehensive list of changes in thi
>  New Compiler Flags
>  ------------------
>
> +- :option:`-ffp-cast-overflow-workaround` and
> +  :option:`-fnofp-cast-overflow-workaround`
>

Shouldn't this be -fno-fp-cast-overflow-workaround?

Also, our convention for flags that define undefined behavior is
`-fno-strict-*`, so perhaps this should be `-fno-strict-fp-cast-overflow`?


> +  enable (disable) a workaround for code that casts floating-point values
> to
> +  integers and back to floating-point. If the floating-point value is not
> +  representable in the intermediate integer type, the code is incorrect
> +  according to the language standard.


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."


> This flag will attempt to generate code
> +  as if the result of an overflowing conversion matches the overflowing
> behavior
> +  of a target's native float-to-int conversion instructions.
> +
>  - ...
>
>  Deprecated Compiler Flags
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180427/6a24b1f2/attachment.html>


More information about the cfe-commits mailing list