[PATCH] D146188: [Clang][DOC] Add documentation in for __builtin_flt_rounds and __builtin_set_flt_rounds
John McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Mar 27 10:15:29 PDT 2023
rjmccall added a comment.
In D146188#4223249 <https://reviews.llvm.org/D146188#4223249>, @xiongji90 wrote:
> Hi, @rjmccall and @sepavloff
> In UserManual, we include a section `Controlling Floating Point Behavior`: https://github.com/llvm/llvm-project/blob/main/clang/docs/UsersManual.rst#controlling-floating-point-behavior , now we need to add a new section for floating-point environment, do we need to add the new section in parallel with `Controlling Floating Point Behavior` section or just put the section under `Controlling Floating Point Behavior`? And current `Controlling Floating Point Behavior` includes following description:
> `Clang provides a number of ways to control floating point behavior, including with command line options and source pragmas.`
> So, we need to update it to `Clang provides a number of ways to control floating point behavior, including with command line options, source pragmas and builtins.` and mention __builtin_flt_rounds, __builtin_set_flt_rounds in this section. Does this meet your expectation?
I think you should add a subsection to Controlling Floating Point Behavior about the floating-point environment. You should not mention these builtins there specifically — if you want an example function that reads or modifies the environment, you should use one of the standard APIs like the `FLT_ROUNDS` macro or the `fesetround` function. You should also add the documentation for these builtins where you've currently got it, and that documentation can cross-reference to Controlling Floating Point Behavior. Does that make sense?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D146188/new/
https://reviews.llvm.org/D146188
More information about the cfe-commits
mailing list