[PATCH] D40673: Add _Float128 as alias to __float128 to enable compilations on Fedora27/glibc2-26

Hubert Tong via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Nov 30 14:26:56 PST 2017


hubert.reinterpretcast added inline comments.


================
Comment at: test/Sema/_Float128.cpp:1
+// RUN: %clang_cc1 -verify -std=gnu++11 %s
+// RUN: %clang_cc1 -verify -std=c++11 %s
----------------
GCC documents that it does not support `_Float128` in C++ mode, and I think their decision makes sense:
On various targets, `long double` and `__float128` are not the same type, but they decided to mangle them the same under `-mlong-double-128` anyway. They also decided to make `__float128` and `_Float128` synonyms in the C mode on at least some of those targets.

The unfortunate state of affairs with the mangling may be okay for an extension type like `__float128`, but creating that situation with `_Float128` does not seem wise. The test here is explicitly C++, so it seems this patch exposes `_Float128` in C++ mode in a state that needs more discussion (and, in my opinion, one that should not ship).



https://reviews.llvm.org/D40673





More information about the cfe-commits mailing list