This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
__float128 and _Float128 compatibility from ABI point of view
- From: Vincent Lefevre <vincent+gcc at vinc17 dot org>
- To: gcc-help at gcc dot gnu dot org
- Date: Thu, 22 Feb 2018 15:08:27 +0100
- Subject: __float128 and _Float128 compatibility from ABI point of view
- Authentication-results: sourceware.org; auth=none
For the next MPFR major release (4.1.0), we plan to change __float128
to _Float128 (with a fallback to __float128 when necessary):
int mpfr_set_float128 (mpfr_ptr, __float128, mpfr_rnd_t);
__float128 mpfr_get_float128 (mpfr_srcptr, mpfr_rnd_t);
will become
int mpfr_set_float128 (mpfr_ptr, _Float128, mpfr_rnd_t);
_Float128 mpfr_get_float128 (mpfr_srcptr, mpfr_rnd_t);
(note: these prototypes are defined only when the user defines
MPFR_WANT_FLOAT128).
If I understand the GCC manual correctly, __float128 and _Float128,
when they both exist, are not necessarily the same type, though
they have the same representation (specified by IEEE 754-2008).
Can this be regarded as an incompatible change for the ABI?
I mean, if a program has been built against a MPFR version with
__float128, can it still be linked against a MPFR version with
_Float128 without any error?
--
Vincent Lefèvre <vincent@vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)