[RFC] Appropriate portable data type for IEEE half-precision on C/C++

Kito Cheng kito.cheng@gmail.com
Fri Mar 12 09:37:50 GMT 2021


Hi Jonathan:

> > C++ also has another proposal for extended floating-point types
> > (https://wg21.link/p1467), which included half-precision types, so in
> > my understanding, _Float16 won't be a portable typen between C/C++.
>
> Why not just make _Float16 available in C++ as a GCC extension?

Not sure it would introduce any ABI issue or not? Especially the function
name mangling for _Decimal* types, or maybe we could just implement the
interchanged floating point type (_FloatN) part to C++ is fine?

I am happy to implement that if it's an acceptable way to go, and
I guess it could be used when GCC implements P1467 in future.


More information about the Gcc mailing list