gcc/libstdc++-v3
Jonathan Wakely 15cc291887 libstdc++: Fix std::char_traits<C>::move [PR113200]
The current constexpr implementation of std::char_traits<C>::move relies
on being able to compare the pointer parameters, which is not allowed
for unrelated pointers. We can use __builtin_constant_p to determine
whether it's safe to compare the pointers directly. If not, then we know
the ranges must be disjoint and so we can use char_traits<C>::copy to
copy forwards from the first character to the last. If the pointers can
be compared directly, then we can simplify the condition for copying
backwards to just two pointer comparisons.

libstdc++-v3/ChangeLog:

	PR libstdc++/113200
	* include/bits/char_traits.h (__gnu_cxx::char_traits::move): Use
	__builtin_constant_p to check for unrelated pointers that cannot
	be compared during constant evaluation.
	* testsuite/21_strings/char_traits/requirements/113200.cc: New
	test.
2024-01-05 10:23:35 +00:00
..
config Update copyright years. 2024-01-03 12:19:35 +01:00
doc Update copyright years. 2024-01-03 12:19:35 +01:00
include libstdc++: Fix std::char_traits<C>::move [PR113200] 2024-01-05 10:23:35 +00:00
libsupc++ Update copyright years. 2024-01-03 12:19:35 +01:00
po Update copyright years. 2024-01-03 12:19:35 +01:00
python Update copyright years. 2024-01-03 12:19:35 +01:00
scripts Update copyright years. 2024-01-03 12:19:35 +01:00
src Update copyright years. 2024-01-05 08:54:28 +01:00
testsuite libstdc++: Fix std::char_traits<C>::move [PR113200] 2024-01-05 10:23:35 +00:00
acinclude.m4 libstdc++: Fix filebuf::native_handle() for Windows 2023-12-14 23:59:21 +00:00
aclocal.m4 libstdc++: Don't use gstdint.h anymore 2022-10-29 00:55:42 +01:00
ChangeLog Daily bump. 2024-01-05 00:18:48 +00:00
ChangeLog-1998
ChangeLog-1999
ChangeLog-2000
ChangeLog-2001
ChangeLog-2002
ChangeLog-2003
ChangeLog-2004
ChangeLog-2005
ChangeLog-2006
ChangeLog-2007
ChangeLog-2008
ChangeLog-2009
ChangeLog-2010
ChangeLog-2011
ChangeLog-2012
ChangeLog-2013
ChangeLog-2014
ChangeLog-2015
ChangeLog-2016
ChangeLog-2017
ChangeLog-2018
ChangeLog-2019
ChangeLog-2020
ChangeLog-2021
ChangeLog-2022 Rotate ChangeLog files. 2023-01-01 16:20:13 +01:00
ChangeLog-2023 Rotate ChangeLog files. 2024-01-03 11:29:39 +01:00
config.h.in libstdc++: Regenerate config.h.in 2023-11-17 15:28:43 +00:00
configure libstdc++: Fix filebuf::native_handle() for Windows 2023-12-14 23:59:21 +00:00
configure.ac Config,Darwin: Allow for configuring Darwin to use embedded runpath. 2023-10-22 19:30:02 +01:00
configure.host LoongArch: Adjust C++ multilib header layout. 2023-09-08 17:51:06 +08:00
crossconfig.m4 libstdc++: Allow emergency EH alloc pool size to be tuned [PR68606] 2022-10-11 16:21:48 +01:00
fragment.am
linkage.m4 libstdc++: Remove handling for underscore-prefixed libm functions [PR111638] 2023-11-11 00:41:08 +00:00
Makefile.am Update copyright years. 2024-01-03 12:19:35 +01:00
Makefile.in Allow overriding EXPECT 2023-12-22 10:24:56 +00:00
README

file: libstdc++-v3/README

New users may wish to point their web browsers to the file
index.html in the 'doc/html' subdirectory.  It contains brief
building instructions and notes on how to configure the library in
interesting ways.