Author: Zahira Ammarguellat Date: 2022-08-23T14:35:57-04:00 New Revision: ba8b5ff874ad438a07ac3cc4f2bc75898b1401f8
URL: https://github.com/llvm/llvm-project/commit/ba8b5ff874ad438a07ac3cc4f2bc75898b1401f8 DIFF: https://github.com/llvm/llvm-project/commit/ba8b5ff874ad438a07ac3cc4f2bc75898b1401f8.diff LOG: Adding a note about the macro __FLT_EVAL_METHOD__; NFC This is to clarify that the macro __FLT_EVAL_METHOD__ is not pre- defined like other preprocessor macros. It will not appear when preprocessor macros are dumped. Differential Revision: https://reviews.llvm.org/D124033 Added: Modified: clang/docs/UsersManual.rst Removed: ################################################################################ diff --git a/clang/docs/UsersManual.rst b/clang/docs/UsersManual.rst index 78ccf4572ffc..883a0df32992 100644 --- a/clang/docs/UsersManual.rst +++ b/clang/docs/UsersManual.rst @@ -1631,12 +1631,15 @@ Note that floating-point operations performed as part of constant initialization 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: _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits