glibc/bits
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
..
types Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
atomic_wide_counter.h Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
byteswap.h Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
confname.h Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
dirent_ext.h Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
dirent.h Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
dl_find_object.h Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
dlfcn.h Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
elfclass.h
endian.h
environments.h Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
errno.h Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
fcntl.h Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
fenv.h Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
floatn-common.h Update _FloatN header support for C++ in GCC 13 2022-09-28 20:10:08 +00:00
floatn.h Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
flt-eval-method.h Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
fp-fast.h Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
fp-logb.h Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
hwcap.h Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
in.h non-linux: bits/in.h: Add more RFC options 2022-08-15 11:27:04 +02:00
indirect-return.h Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
ioctl-types.h Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
ioctls.h
ipc.h Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
ipctypes.h Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
iscanonical.h Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
libc-header-start.h Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
libm-simd-decl-stubs.h Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
link_lavcurrent.h elf: Issue la_symbind for bind-now (BZ #23734) 2022-02-01 14:49:46 -03:00
link.h
local_lim.h
long-double.h Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
math-vector.h Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
mathdef.h Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
mman_ext.h linux: Add process_madvise 2022-06-02 15:43:28 -03:00
mman.h Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
mqueue.h Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
msq.h Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
netdb.h Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
param.h Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
poll.h Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
posix_opt.h
pthreadtypes.h
resource.h Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
sched.h Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
select.h Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
sem.h Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
setjmp.h
shm.h Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
sigaction.h Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
sigcontext.h Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
sigevent-consts.h Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
siginfo-consts.h Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
signal_ext.h Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
signum-arch.h Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
signum-generic.h Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
sigstack.h Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
sigstksz.h Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
sigthread.h Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
sockaddr.h Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
socket.h socket: Check lengths before advancing pointer in CMSG_NXTHDR 2022-08-02 11:10:25 +02:00
ss_flags.h Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
stat.h Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
statfs.h Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
statvfs.h Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
stdint-intn.h Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
stdint-uintn.h Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
stdlib-bsearch.h Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
syslog-path.h Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
sysmacros.h Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
termios.h Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
time64.h Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
time.h Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
timesize.h Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
typesizes.h Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
uintn-identity.h Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
uio_lim.h Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
uio-ext.h Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
unistd_ext.h Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
utmp.h Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
utsname.h Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
waitflags.h Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
waitstatus.h Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
wchar.h Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
wordsize.h Define wordsize.h macros everywhere 2016-11-04 09:37:44 -07:00