On Tue, Sep 15, 2020 at 01:37:20AM -0400, Michael Meissner wrote:
> > What's the benefit of having __float128 and IEEE long double be
> > distinct types? That complicates things for libraries like libstdc++.
> > If we want to support using "__float128" with C++ iostreams then we
> > need yet another set of I/O routines, even though it's identical to
> > one of the types we already handle. Why not just keep __float128 and
> > __ieee128 and "long double when long double is IEEE" as three
> > different aliases for the same type, so that C++ code like
> > _Z4funcu9__ieee128 works for all of them, instead of needing to also
> > define _Z4funcu12__ieee128_ld?
> 
> The Boost library has methods that have both long double and __float128 in it.
> My main concern is not to break user code like Boost that the users may added
> __float128.  Obviously with glibc and libstdc++ we have people who understand
> the issues, but who knows what other libraries people have come up with.

So it will need some changes, we can describe what needs to change in
gcc-11/porting_to.html.  Boost already needs code not to enable it if
__float128 doesn't exist, so the condition would just change to __float128
does not exist or long double is the same thing (e.g. mangles the same) as
__float128). But trying to mangle __float128 and long double
differently when they are the same thing is much bigger pain, for libraries
that want to support all that would mean having to export not 5 sets of
floating point entrypoints, but 6 (float, double, long double same as
double, long double same as __ibm128, long double same as __float128,
__float128).

        Jakub

Reply via email to