[PATCH] D146188: [Clang][DOC] Add documentation in for __builtin_flt_rounds and __builtin_set_flt_rounds

xiongji90 via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Mar 19 20:56:26 PDT 2023


xiongji90 added inline comments.


================
Comment at: clang/docs/LanguageExtensions.rst:3295
+support this builtin. Since this builtin changes default floating-point
+environment, ``#pragma STDC FENV_ACCESS ON`` is required.
+
----------------
rjmccall wrote:
> sepavloff wrote:
> > Not necessary. Options `-ffp-model=strict` or `-frounding-math` also can be used. I would remove this statement.
> It is appropriate to at least say that not all modes permit changing the default floating-point environment and cross-reference the appropriate place in the Clang documentation where we talk about that in more detail.  If we don't have such a place already, this is the time to add it.
Hi, @rjmccall and @sepavloff 
I removed the statement that requiring to add "#pragma stdc fenv access", I checked the doc that there has not been any description about default fp environment, do you mean we need to add such description first and cross-reference it here?
Thanks very much.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D146188/new/

https://reviews.llvm.org/D146188



More information about the cfe-commits mailing list