Go to file
Jonathan Wakely 2cae56bd61 Remove redundant std::allocator members for C++20
C++20 removes a number of std::allocator members that have correct
defaults provided by std::allocator_traits, so aren't needed.

Several extensions including __gnu_cxx::hash_map and tr1 containers are
no longer usable with std::allocator in C++20 mode. They need to be
updated to use __gnu_cxx::__alloc_traits in a follow-up patch.

	* include/bits/alloc_traits.h
	(allocator_traits<allocator<T>>::allocate): Ignore hint for C++20.
	(allocator_traits<allocator<T>>::construct): Perform placement new
	directly for C++20, instead of calling allocator<T>::construct.
	(allocator_traits<allocator<T>>::destroy): Call destructor directly
	for C++20, instead of calling allocator<T>::destroy.
	(allocator_traits<allocator<T>>::max_size): Return value directly
	for C++20, instead of calling std::allocator<T>::max_size().
	(__do_alloc_on_copy, __do_alloc_on_move, __do_alloc_on_swap): Do not
	define for C++17 and up.
	(__alloc_on_copy, __alloc_on_move, __alloc_on_swap): Use if-constexpr
	for C++17 and up, instead of tag dispatching.
	* include/bits/allocator.h (allocator<void>): Remove for C++20.
	(allocator::pointer, allocator::const_pointer, allocator::reference)
	(allocator::const_reference, allocator::rebind): Remove for C++20.
	* include/bits/basic_string.h (basic_string): Use __alloc_traits to
	rebind allocator.
	* include/bits/memoryfwd.h (allocator<void>): Remove for C++20.
	* include/ext/debug_allocator.h: Use __alloc_traits for rebinding.
	* include/ext/malloc_allocator.h (malloc_allocator::~malloc_allocator)
	(malloc_allocator::pointer, malloc_allocator::const_pointer)
	(malloc_allocator::reference, malloc_allocator::const_reference)
	(malloc_allocator::rebind, malloc_allocator::max_size)
	(malloc_allocator::construct, malloc_allocator::destroy): Do not
	define for C++20.
	(malloc_allocator::_M_max_size): Define new function.
	* include/ext/new_allocator.h (new_allocator::~new_allocator)
	(new_allocator::pointer, new_allocator::const_pointer)
	(new_allocator::reference, new_allocator::const_reference)
	(new_allocator::rebind, new_allocator::max_size)
	(new_allocator::construct, new_allocator::destroy): Do not
	define for C++20.
	(new_allocator::_M_max_size): Define new function.
	* include/ext/rc_string_base.h (__rc_string_base::_Rep): Use
	__alloc_traits to rebind allocator.
	* include/ext/rope (_Rope_rep_base, _Rope_base): Likewise.
	(rope::rope(CharT, const allocator_type&)): Use __alloc_traits
	to construct character.
	* include/ext/slist (_Slist_base): Use __alloc_traits to rebind
	allocator.
	* include/ext/sso_string_base.h (__sso_string_base::_M_max_size):
	Use __alloc_traits.
	* include/ext/throw_allocator.h (throw_allocator): Do not use optional
	members of std::allocator, use __alloc_traits members instead.
	* include/ext/vstring.h (__versa_string): Use __alloc_traits.
	* include/ext/vstring_util.h (__vstring_utility): Likewise.
	* include/std/memory: Include <bits/alloc_traits.h>.
	* testsuite/20_util/allocator/8230.cc: Use __gnu_test::max_size.
	* testsuite/20_util/allocator/rebind_c++20.cc: New test.
	* testsuite/20_util/allocator/requirements/typedefs.cc: Do not check
	for pointer, const_pointer, reference, const_reference or rebind in
	C++20.
	* testsuite/20_util/allocator/requirements/typedefs_c++20.cc: New test.
	* testsuite/23_containers/deque/capacity/29134.cc: Use
	__gnu_test::max_size.
	* testsuite/23_containers/forward_list/capacity/1.cc: Likewise.
	* testsuite/23_containers/list/capacity/29134.cc: Likewise.
	* testsuite/23_containers/map/capacity/29134.cc: Likewise.
	* testsuite/23_containers/multimap/capacity/29134.cc: Likewise.
	* testsuite/23_containers/multiset/capacity/29134.cc: Likewise.
	* testsuite/23_containers/set/capacity/29134.cc: Likewise.
	* testsuite/23_containers/vector/capacity/29134.cc: Likewise.
	* testsuite/ext/malloc_allocator/variadic_construct.cc: Do not run
	test for C++20.
	* testsuite/ext/new_allocator/variadic_construct.cc: Likewise.
	* testsuite/ext/vstring/capacity/29134.cc: Use __gnu_test::max_size.
	* testsuite/util/replacement_memory_operators.h: Do not assume
	Alloc::pointer exists.
	* testsuite/util/testsuite_allocator.h (__gnu_test::max_size): Define
	helper to call max_size for any allocator.

From-SVN: r277300
2019-10-22 22:48:39 +01:00
INSTALL
config [ARM/FDPIC v6 02/24] [ARM] FDPIC: Handle arm*-*-uclinuxfdpiceabi in configure scripts 2019-09-10 09:37:00 +02:00
contrib contrib: Add KPASS support to dg-extract-results.{sh,py} 2019-10-21 13:41:29 +01:00
fixincludes
gcc Fix incorrect merge of conflictant names in `dump_graphviz` 2019-10-22 19:05:49 +00:00
gnattools
gotools libgo: update to Go 1.13beta1 release 2019-09-06 18:12:46 +00:00
include
intl
libada libada: Respect `--enable-version-specific-runtime-libs' 2019-10-01 19:14:11 +00:00
libatomic Regenerate `configure' scripts for `uclinuxfdpiceabi' libtool.m4 update 2019-09-27 21:24:42 +00:00
libbacktrace Regenerate `configure' scripts for `uclinuxfdpiceabi' libtool.m4 update 2019-09-27 21:24:42 +00:00
libcc1 Regenerate `configure' scripts for `uclinuxfdpiceabi' libtool.m4 update 2019-09-27 21:24:42 +00:00
libcpp [linemap PATCH] Constify lookup 2019-10-15 12:03:04 +00:00
libdecnumber
libffi Regenerate `configure' scripts for `uclinuxfdpiceabi' libtool.m4 update 2019-09-27 21:24:42 +00:00
libgcc fptr.c (_dl_read_access_allowed): Change argument to unsigned int. 2019-10-15 22:17:14 +00:00
libgfortran re PR fortran/91926 (assumed rank optional) 2019-10-19 16:44:06 +00:00
libgo runtime: correct facilities names in s390 CPU support 2019-10-14 14:10:16 +00:00
libgomp re PR libgomp/92081 (FAIL: libgomp.fortran/target-simd.f90 execution test) 2019-10-14 10:48:42 +02:00
libhsail-rt Regenerate `configure' scripts for `uclinuxfdpiceabi' libtool.m4 update 2019-09-27 21:24:42 +00:00
libiberty rust-demangle.c (looks_like_rust): Remove. 2019-10-03 15:54:47 -06:00
libitm Regenerate `configure' scripts for `uclinuxfdpiceabi' libtool.m4 update 2019-09-27 21:24:42 +00:00
libobjc Regenerate `configure' scripts for `uclinuxfdpiceabi' libtool.m4 update 2019-09-27 21:24:42 +00:00
liboffloadmic Regenerate `liboffloadmic/plugin/configure' for r275564 ("[ARM/FDPIC v6 02/24] [ARM] FDPIC... 2019-10-01 19:57:44 +00:00
libphobos Regenerate `configure' scripts for `uclinuxfdpiceabi' libtool.m4 update 2019-09-27 21:24:42 +00:00
libquadmath Regenerate `configure' scripts for `uclinuxfdpiceabi' libtool.m4 update 2019-09-27 21:24:42 +00:00
libsanitizer Arm: Fix arm libsanitizer bootstrap failure 2019-10-22 14:25:38 +00:00
libssp Regenerate `configure' scripts for `uclinuxfdpiceabi' libtool.m4 update 2019-09-27 21:24:42 +00:00
libstdc++-v3 Remove redundant std::allocator members for C++20 2019-10-22 22:48:39 +01:00
libvtv Regenerate `configure' scripts for `uclinuxfdpiceabi' libtool.m4 update 2019-09-27 21:24:42 +00:00
lto-plugin Regenerate `configure' scripts for `uclinuxfdpiceabi' libtool.m4 update 2019-09-27 21:24:42 +00:00
maintainer-scripts
zlib Regenerate `configure' scripts for `uclinuxfdpiceabi' libtool.m4 update 2019-09-27 21:24:42 +00:00
.dir-locals.el
.gitattributes * .gitattributes: Also check ChangeLog whitespace. 2019-10-21 23:12:04 -04:00
.gitignore
ABOUT-NLS
COPYING
COPYING.LIB
COPYING.RUNTIME
COPYING3
COPYING3.LIB
ChangeLog * .gitattributes: Also check ChangeLog whitespace. 2019-10-21 23:12:04 -04:00
ChangeLog.jit
ChangeLog.tree-ssa
MAINTAINERS Remove Cell Broadband Engine SPU targets 2019-10-08 12:20:50 +02:00
Makefile.def
Makefile.in
Makefile.tpl
README
ar-lib
compile
config-ml.in
config.guess Update config.sub and config.guess. 2019-09-09 11:14:32 +02:00
config.rpath
config.sub Update config.sub and config.guess. 2019-09-09 11:14:32 +02:00
configure GCC port for eBPF 2019-09-09 12:13:23 +02:00
configure.ac GCC port for eBPF 2019-09-09 12:13:23 +02:00
depcomp
install-sh
libtool-ldflags
libtool.m4 [ARM/FDPIC v6 02/24] [ARM] FDPIC: Handle arm*-*-uclinuxfdpiceabi in configure scripts 2019-09-10 09:37:00 +02:00
ltgcc.m4
ltmain.sh
ltoptions.m4
ltsugar.m4
ltversion.m4
lt~obsolete.m4
missing
mkdep
mkinstalldirs
move-if-change
multilib.am
symlink-tree
test-driver
ylwrap

README

This directory contains the GNU Compiler Collection (GCC).

The GNU Compiler Collection is free software.  See the files whose
names start with COPYING for copying permission.  The manuals, and
some of the runtime libraries, are under different terms; see the
individual source files for details.

The directory INSTALL contains copies of the installation information
as HTML and plain text.  The source of this information is
gcc/doc/install.texi.  The installation information includes details
of what is included in the GCC sources and what files GCC installs.

See the file gcc/doc/gcc.texi (together with other files that it
includes) for usage and porting information.  An online readable
version of the manual is in the files gcc/doc/gcc.info*.

See http://gcc.gnu.org/bugs/ for how to report bugs usefully.

Copyright years on GCC source files may be listed using range
notation, e.g., 1987-2012, indicating that every year in the range,
inclusive, is a copyrightable year that could otherwise be listed
individually.