This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH v3 4/8] float128: Add public _Float128 declarations to libm.
On Tue, 9 May 2017, Joseph Myers wrote:
> > +/* Include the file of declarations again, this time using `_Float128'
> > + instead of `double' and appending f128 to each function name. */
> > +
> > +#if __HAVE_DISTINCT_FLOAT128
>
> That's not the right logically condition for when to declare (subject to
> __GLIBC_USE (IEC_60559_TYPES_EXT)) most functions. I think
> __HAVE_FLOAT128 && !defined _LIBC might be better, by analogy with the
> conditions for declaring long double functions. (long double tests
> _LIBC_TEST as well, but _LIBC_TEST use ought to be obsolete after Zack's
> patch to avoid internal declarations, including _LIBC, for most of the
> testsuite).
Correction:
If there's a distinct _Float128, the functions should be declared, both
inside and outside libc. If it exists but is not distinct, they should
only be declared outside libc. So:
#if __HAVE_DISTINCT_FLOAT128 || (__HAVE_FLOAT128 && !defined _LIBC)
should be right.
Also, for the patch where bits/floatn.h is added for powerpc64le: note
that GCC 7 supports _Float128 and the f128 constant suffix for C, not for
C++. The header will need to do appropriate things for C++: either
declare the feature not to be supported, or, if you want to be able to use
the APIs for C++ (which seems sensible), map _Float128 to __float128 for
C++ even for GCC 7 and later.
--
Joseph S. Myers
joseph@codesourcery.com