This has broken building the mainline glibc testsuite with GCC mainline 
for platforms where long double has binary128 format.

Recall that _FloatN type names are not supported for C++, because of the 
expectation that any C++ bindings for such types would be class-based like 
the TR 24733 DFP support rather than using built-in types such as 
_Float128.  Thus glibc uses __float128 to define _Float128 internally for 
C++ where __float128 is available, but where it is not available but long 
double has that format, the headers use long double to implement 
_Float128.  Thus you get conflicting declarations, headers declaring 
sqrtf128 to use a typedef for long double but the built-in functions using 
the internal _Float128 type that has no built-in name referring directly 
to it for C++.

One obvious possible fix would be for the builtins.def macros never to 
define public names such as sqrtf128 for C++, only ever for C.  That would 
be on the basis that C++ code is expected to be using a sqrt overload 
anyway - so making the built-in function available under a public name, in 
the case where __float128 exists for C++, is a matter for libstdc++ 
headers.

-- 
Joseph S. Myers
jos...@codesourcery.com

Reply via email to