This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Add _Float128 function aliases [committed]
- From: Joseph Myers <joseph at codesourcery dot com>
- To: Szabolcs Nagy <szabolcs dot nagy at arm dot com>
- Cc: <libc-alpha at sourceware dot org>, <nd at arm dot com>
- Date: Tue, 9 Jan 2018 16:47:04 +0000
- Subject: Re: Add _Float128 function aliases [committed]
- Authentication-results: sourceware.org; auth=none
- References: <alpine.DEB.2.20.1710181737470.28577@digraph.polyomino.org.uk> <5A54E211.8080702@arm.com>
On Tue, 9 Jan 2018, Szabolcs Nagy wrote:
> note that this typedef in a public header does not work
> on compilers that support _Float128 but not >=gcc-7
It's entirely appropriate to add support for other compilers in
bits/floatn.h headers (there are several bits/floatn.h variants in glibc -
if it's a matter of "clang version N supports _Float128 on this set of
configurations", the headers used by those configurations are the ones
appropriate to update), where those compilers have some form of _FloatN /
_FloatNx / __float128 support that could reasonably be used with installed
glibc headers.
To reiterate the reasoning for not supporting the _Float128 keyword for
C++ in GCC: standard C++ often tends to use class-based library approaches
for features that C puts in the language; in particular, C++ chose to use
std::decimal instead of _Decimal32, _Decimal64, _Decimal128 keywords.
Thus, it seems plausible that a C++ binding for types corresponding to
IEEE binary floating-point formats and semantics would also be class-based
rather than involving new keywords.
--
Joseph S. Myers
joseph@codesourcery.com