glibc/sysdeps/ieee754
Joseph Myers 3e5760fcb4 Update _FloatN header support for C++ in GCC 13
GCC 13 adds support for _FloatN and _FloatNx types in C++, so breaking
the installed glibc headers that assume such support is not present.
GCC mostly works around this with fixincludes, but that doesn't help
for building glibc and its tests (glibc doesn't itself contain C++
code, but there's C++ code built for tests).  Update glibc's
bits/floatn-common.h and bits/floatn.h headers to handle the GCC 13
support directly.

In general the changes match those made by fixincludes, though I think
the ones in sysdeps/powerpc/bits/floatn.h, where the header tests
__LDBL_MANT_DIG__ == 113 or uses #elif, wouldn't match the existing
fixincludes patterns.

Some places involving special C++ handling in relation to _FloatN
support are not changed.  There's no need to change the
__HAVE_FLOATN_NOT_TYPEDEF definition (also in a form that wouldn't be
matched by the fixincludes fixes) because it's only used in relation
to macro definitions using features not supported for C++
(__builtin_types_compatible_p and _Generic).  And there's no need to
change the inline function overloads for issignaling, iszero and
iscanonical in C++ because cases where types have the same format but
are no longer compatible types are handled automatically by the C++
overload resolution rules.

This patch also does not change the overload handling for iseqsig, and
there I think changes *are* needed, beyond those in this patch or made
by fixincludes.  The way that overload is defined, via a template
parameter to a structure type, requires overloads whenever the types
are incompatible, even if they have the same format.  So I think we
need to add overloads with GCC 13 for every supported _FloatN and
_FloatNx type, rather than just having one for _Float128 when it has a
different ABI to long double as at present (but for older GCC, such
overloads must not be defined for types that end up defined as
typedefs for another type).

Tested with build-many-glibcs.py: compilers build for
aarch64-linux-gnu ia64-linux-gnu mips64-linux-gnu powerpc-linux-gnu
powerpc64le-linux-gnu x86_64-linux-gnu; glibcs build for
aarch64-linux-gnu ia64-linux-gnu i686-linux-gnu mips-linux-gnu
mips64-linux-gnu-n32 powerpc-linux-gnu powerpc64le-linux-gnu
x86_64-linux-gnu.
2022-09-28 20:10:08 +00:00
..
dbl-64 x86_64: Optimize sincos where sin/cos is optimized (bug 29193) 2022-06-01 10:29:52 +02:00
float128 Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
flt-32 i686: Use generic sincosf implementation for SSE2 version 2022-06-01 10:47:44 -03:00
ldbl-64-128 Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
ldbl-96 math: Add math-use-builtins-fabs (BZ#29027) 2022-05-23 17:49:18 -03:00
ldbl-128 Update _FloatN header support for C++ in GCC 13 2022-09-28 20:10:08 +00:00
ldbl-128ibm math: Add math-use-builtins-fabs (BZ#29027) 2022-05-23 17:49:18 -03:00
ldbl-128ibm-compat Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
ldbl-opt Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
soft-fp Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
ieee754.h Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
k_standard.c Use copysign functions not __copysign functions in glibc libm. 2018-09-27 20:04:48 +00:00
k_standardf.c Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
k_standardl.c Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
libm-alias-finite.h Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
Makefile Avoid -Wno-write-strings for k_standard.c. 2015-02-26 22:50:54 +00:00
s_lib_version.c Simplify math-svid-compat code. 2017-08-28 15:19:52 +00:00
s_matherr.c Obsolete matherr, _LIB_VERSION, libieee.a. 2017-08-21 17:45:10 +00:00
s_signgam.c Remove unnecessary math_private.h includes. 2018-09-28 21:53:33 +00:00