[PATCH] D109751: [Clang] Support conversion between PPC double-double and IEEE float128

Qiu Chaofan via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Dec 28 21:27:06 PST 2021


qiucf added a comment.

In D109751#3191148 <https://reviews.llvm.org/D109751#3191148>, @hubert.reinterpretcast wrote:

> In D109751#3178494 <https://reviews.llvm.org/D109751#3178494>, @qiucf wrote:
>
>> Thanks for the reminder. Here GCC and Clang diverges in the handling of `__ibm128`/`__float128` and `long double`. Not sure whether GCC will 'fix' the behavior, but here (and in most of the use case in glibc headers) it's `__builtin_types_compatible_p(..., _Float128)` where GCC/Clang behaves the same.
>
> I thought Clang doesn't have `_Float128` yet; that's D111382 <https://reviews.llvm.org/D111382>, which makes `_Float128` act like `__float128` (and, in turn, like `__ieee128`).
>
> With `-mabi=ieeelongdouble`:
>
>   extern char x[__builtin_types_compatible_p(long double, __float128) ? 1 : -1]; // GCC accepts; Clang rejects
>
> https://godbolt.org/z/fGbY1Y1PT

I tried making them 'compatible', but that only affects to C (and C++ doesn't have this builtin), `std::is_same<long double, __float128>` still says they're different. Should that be an issue?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D109751



More information about the cfe-commits mailing list