[PATCH] D124033: [NFC] Adding a note about the macro __FLT_EVAL_METHOD__

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 23 11:37:07 PDT 2022


This revision was automatically updated to reflect the committed changes.
Closed by commit rGba8b5ff874ad: Adding a note about the macro __FLT_EVAL_METHOD__; NFC (authored by zahiraam, committed by aaron.ballman).

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D124033

Files:
  clang/docs/UsersManual.rst


Index: clang/docs/UsersManual.rst
===================================================================
--- clang/docs/UsersManual.rst
+++ clang/docs/UsersManual.rst
@@ -1631,12 +1631,15 @@
 
 A note about ``__FLT_EVAL_METHOD__``
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-The macro ``__FLT_EVAL_METHOD__`` will expand to either the value set from the
-command line option ``ffp-eval-method`` or to the value from the target info
-setting. The ``__FLT_EVAL_METHOD__`` macro cannot expand to the correct
-evaluation method in the presence of a ``#pragma`` which alters the evaluation
-method. An error is issued if ``__FLT_EVAL_METHOD__`` is expanded inside a scope
-modified by ``#pragma clang fp eval_method``.
+The ``__FLT_EVAL_METHOD__`` is not defined as a traditional macro, and so it
+will not appear when dumping preprocessor macros. Instead, the value
+``__FLT_EVAL_METHOD__`` expands to is determined at the point of expansion
+either from the value set by the ``-ffp-eval-method`` command line option or
+from the target. This is because the ``__FLT_EVAL_METHOD__`` macro
+cannot expand to the correct evaluation method in the presence of a ``#pragma``
+which alters the evaluation method. An error is issued if
+``__FLT_EVAL_METHOD__`` is expanded inside a scope modified by
+``#pragma clang fp eval_method``.
 
 .. _fp-constant-eval:
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D124033.454910.patch
Type: text/x-patch
Size: 1342 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220823/fdf12604/attachment.bin>


More information about the cfe-commits mailing list