[PATCH] D53486: [libcxx] Only define __libcpp_is_floating_point<_Float16> for Clang

Louis Dionne via Phabricator reviews at reviews.llvm.org
Mon Oct 22 14:58:46 PDT 2018


ldionne added a comment.

In https://reviews.llvm.org/D53486#1271330, @phosek wrote:

> I don't know why we chosen that approach, but Arm Compiler Reference Guide <http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.100067_0610_00_en/sex1519040854421.html> explicitly mentions that `_Float16` is being available in C and C++. @peter.smith might know why that's the case?
>
> Do you have any other suggestion on how to handle this?


I see roughly two options:

1. Never provide support for `_Float16` in C++ -- `_Float16` does not appear to be part of the C11 standard according to http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1570.pdf (I think it may be part of a TS).
2. If only GCC is not providing `_Float16` in C++ but other compilers are providing it, perhaps changing the condition to `#if !defined(__GNUC__)` (or whatever the `#define` is, and also filing a complaint against GCC for diverging from other implementations.


Repository:
  rCXX libc++

https://reviews.llvm.org/D53486





More information about the libcxx-commits mailing list