kito-cheng created this revision.
kito-cheng requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

ACLE didn't specify the default argument promotion rule on __fp16, but
the current implementation both on GCC and clang are applied default
argument promotion rule on __fp16, so I think it should document that.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D97912

Files:
  clang/docs/LanguageExtensions.rst


Index: clang/docs/LanguageExtensions.rst
===================================================================
--- clang/docs/LanguageExtensions.rst
+++ clang/docs/LanguageExtensions.rst
@@ -569,12 +569,13 @@
 ``3.14f16``.
 
 Because default argument promotion only applies to the standard floating-point
-types, ``_Float16`` values are not promoted to ``double`` when passed as 
variadic
-or untyped arguments.  As a consequence, some caution must be taken when using
-certain library facilities with ``_Float16``; for example, there is no 
``printf`` format
-specifier for ``_Float16``, and (unlike ``float``) it will not be implicitly 
promoted to
-``double`` when passed to ``printf``, so the programmer must explicitly cast 
it to
-``double`` before using it with an ``%f`` or similar specifier.
+types and ``__fp16``, ``_Float16`` values are not promoted to ``double`` when
+passed as variadic or untyped arguments.  As a consequence, some caution must
+be taken when using certain library facilities with ``_Float16``; for example,
+there is no ``printf`` format specifier for ``_Float16``, and (unlike 
``float``)
+it will not be implicitly promoted to ``double`` when passed to ``printf``, so
+the programmer must explicitly cast it to ``double`` before using it with an
+``%f`` or similar specifier.
 
 Messages on ``deprecated`` and ``unavailable`` Attributes
 =========================================================


Index: clang/docs/LanguageExtensions.rst
===================================================================
--- clang/docs/LanguageExtensions.rst
+++ clang/docs/LanguageExtensions.rst
@@ -569,12 +569,13 @@
 ``3.14f16``.
 
 Because default argument promotion only applies to the standard floating-point
-types, ``_Float16`` values are not promoted to ``double`` when passed as variadic
-or untyped arguments.  As a consequence, some caution must be taken when using
-certain library facilities with ``_Float16``; for example, there is no ``printf`` format
-specifier for ``_Float16``, and (unlike ``float``) it will not be implicitly promoted to
-``double`` when passed to ``printf``, so the programmer must explicitly cast it to
-``double`` before using it with an ``%f`` or similar specifier.
+types and ``__fp16``, ``_Float16`` values are not promoted to ``double`` when
+passed as variadic or untyped arguments.  As a consequence, some caution must
+be taken when using certain library facilities with ``_Float16``; for example,
+there is no ``printf`` format specifier for ``_Float16``, and (unlike ``float``)
+it will not be implicitly promoted to ``double`` when passed to ``printf``, so
+the programmer must explicitly cast it to ``double`` before using it with an
+``%f`` or similar specifier.
 
 Messages on ``deprecated`` and ``unavailable`` Attributes
 =========================================================
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
  • [PATCH] D97912: [doc] Document ... Kito Cheng via Phabricator via cfe-commits

Reply via email to