Commit Graph

869 Commits

Author SHA1 Message Date
Jonathan Wakely
637e3668fd libstdc++: Allow emergency EH alloc pool size to be tuned [PR68606]
Implement a long-standing request to support tuning the size of the
emergency buffer for allocating exceptions after malloc fails, or to
disable that buffer entirely.

It's now possible to disable the dynamic allocation of the buffer and
use a fixed-size static buffer, via --enable-libstdcxx-static-eh-pool.
This is a built-time choice that is baked into libstdc++ and so affects
all code linked against that build of libstdc++.

The size of the pool can be set by --with-libstdcxx-eh-pool-obj-count=N
which is measured in units of sizeof(void*) not bytes. A given exception
type such as std::system_error depends on the target, so giving a size
in bytes wouldn't be portable across 16/32/64-bit targets.

When libstdc++ is configured to use a dynamic buffer, the size of that
buffer can now be tuned at runtime by setting the GLIBCXX_TUNABLES
environment variable (c.f. PR libstdc++/88264). The number of exceptions
to reserve space for is controlled by the "glibcxx.eh_pool.obj_count"
and "glibcxx.eh_pool.obj_size" tunables. The pool will be sized to be
able to allocate obj_count exceptions of size obj_size*sizeof(void*) and
obj_count "dependent" exceptions rethrown by std::rethrow_exception.

With the ability to tune the buffer size, we can reduce the default pool
size on 32-bit and 16-bit targets. Most users never need to throw 1kB
exceptions in parallel from hundreds of threads after malloc is OOM. The
users who do need that can use the tunables to select larger sizes.

The old defaults can be chosen at runtime by setting GLIBCXX_TUNABLES
to:
64-bit: glibcxx.eh_pool.obj_count=64:glibcxx.eh_pool.obj_size=112
32-bit: glibcxx.eh_pool.obj_count=32:glibcxx.eh_pool.obj_size=104

Or approximated by configuring with:
64-bit: --with-libstdcxx-eh-pool-obj-count=252
32-bit: --with-libstdcxx-eh-pool-obj-count=94

libstdc++-v3/ChangeLog:

	PR libstdc++/68606
	* Makefile.in: Regenerate.
	* acinclude.m4 (GLIBCXX_EMERGENCY_EH_ALLOC): New macro.
	* configure: Regenerate.
	* configure.ac: Use GLIBCXX_EMERGENCY_EH_ALLOC.
	* crossconfig.m4: Check for secure_getenv.
	* doc/Makefile.in: Regenerate.
	* doc/xml/manual/configure.xml: Document new configure options.
	* doc/xml/manual/evolution.xml: Document addition of tunables.
	* doc/xml/manual/using_exceptions.xml: Document emergency
	buffer and tunables.
	* doc/html/*: Regenerate.
	* include/Makefile.in: Regenerate.
	* libsupc++/Makefile.am: Use EH_POOL_FLAGS.
	* libsupc++/Makefile.in: Regenerate.
	* libsupc++/eh_alloc.cc (EMERGENCY_OBJ_SIZE): Define in units
	of sizeof(void*) not including the ABI's exception header.
	(EMERGENCY_OBJ_COUNT): Define as target-independent calculation
	based on word size.
	(MAX_OBJ_COUNT): Define macro for upper limit on pool size.
	(pool) [_GLIBCXX_EH_POOL_STATIC]: Use fixed-size buffer.
	(pool::buffer_size_in_bytes): New static member function.
	(pool::pool): Parse GLIBCXX_TUNABLES environment variable to set
	pool size at runtime.
	(pool::in_pool): Use std::less<void*> for total order.
	(__freeres) [_GLIBCXX_EH_POOL_STATIC]: Do nothing.
	(__cxa_free_exception, __cxa_free_dependent_exception): Add
	[[unlikely]] attributes.
	* po/Makefile.in: Regenerate.
	* python/Makefile.in: Regenerate.
	* src/Makefile.in: Regenerate.
	* src/c++11/Makefile.in: Regenerate.
	* src/c++17/Makefile.in: Regenerate.
	* src/c++20/Makefile.in: Regenerate.
	* src/c++98/Makefile.in: Regenerate.
	* src/filesystem/Makefile.in: Regenerate.
	* src/libbacktrace/Makefile.in: Regenerate.
	* testsuite/Makefile.in: Regenerate.
2022-10-11 16:21:48 +01:00
Jonathan Wakely
8e2f453de3 libstdc++: Use bold style for DR titles in the manual
This matches how the issues are styled in the LWG issues list, and also
allows us to use italics for "cv" (e.g. in issue 2487).

libstdc++-v3/ChangeLog:

	* doc/xml/manual/intro.xml: Add role="bold" attribute to
	emphasis elements for issue titles.
	* doc/html/manual/bugs.html: Regenerate.
2022-10-07 12:20:24 +01:00
Jonathan Wakely
c27ddea746 libstdc++: Update status docs for compare_exchange padding bits
libstdc++-v3/ChangeLog:

	* doc/xml/manual/status_cxx2020.xml: Update C++20 status.
	* doc/html/manual/status.html: Regenerate.
2022-10-03 22:02:14 +01:00
Jonathan Wakely
d01f112de4 libstdc++: Disable volatile-qualified std::bind for C++20
LWG 2487 added a precondition to std::bind for C++17, making
volatile-qualified uses undefined. We still support it, but with a
deprecated warning.

P1065R2 made it explicitly ill-formed for C++20, so we should no longer
accept it as deprecated. This implements that change.

libstdc++-v3/ChangeLog:

	* doc/xml/manual/evolution.xml: Document std::bind API
	changes.
	* doc/xml/manual/intro.xml: Document LWG 2487 status.
	* doc/xml/manual/using.xml: Clarify default value of
	_GLIBCXX_USE_DEPRECATED.
	* doc/html/*: Regenerate.
	* include/std/functional (_Bind::operator()(Args&&...) volatile)
	(_Bind::operator()(Args&&...) const volatile)
	(_Bind_result::operator()(Args&&...) volatile)
	(_Bind_result::operator()(Args&&...) const volatile): Replace
	with deleted overload for C++20 and later.
	* testsuite/20_util/bind/cv_quals.cc: Check for deprecated
	warnings in C++17.
	* testsuite/20_util/bind/cv_quals_2.cc: Likewise, and check for
	ill-formed in C++20.
2022-09-29 00:33:46 +01:00
Jonathan Wakely
9c23fe08c1 libstdc++: Remove trailing whitespace in documentation sources
libstdc++-v3/ChangeLog:

	* doc/xml/manual/documentation_hacking.xml: Remove trailing
	whitespace.
	* doc/xml/manual/policy_data_structures.xml: Likewise.
2022-09-21 08:44:22 +01:00
Jonathan Wakely
64f9580423 libstdc++: Fix Doxygen commands
Remove the bogus -D__allocator_base=std::__new_allocator macro
definition for Doxygen, because that's an alias template for C++11 and
later, not a macro.

Fix the @cond/@endcond pair that span the end of an @addtogroup group.
Add another @endcond inside the group, and another @cond after it.

libstdc++-v3/ChangeLog:

	* doc/doxygen/user.cfg.in (PREDEFINED): Remove __allocator_base.
	* include/bits/allocator.h: Fix nesting of Doxygen commands.
2022-09-16 15:54:41 +01:00
Jonathan Wakely
4c156ead37 libstdc++: Document new libstdc++.so symbol versions
libstdc++-v3/ChangeLog:

	* doc/xml/manual/abi.xml: Document GLIBCXX_3.4.30 and
	GLIBCXX_3.4.31 versions.
	* doc/html/manual/abi.html: Regenerate.
2022-09-16 10:50:28 +01:00
Jonathan Wakely
8b1bc3051b libstdc++: Document LWG 1203 API change in manual
libstdc++-v3/ChangeLog:

	* doc/xml/manual/intro.xml: Document LWG 1203.
	* doc/html/*: Regenerate.
2022-09-14 19:17:36 +01:00
François Dumont
4d5660907c libstdc++: [_GLIBCXX_DEBUG] Add backtrace generation on demand
Add _GLIBCXX_DEBUG_BACKTRACE macro to activate backtrace generation on
_GLIBCXX_DEBUG assertions. Prerequisite is to have configure the lib with:

--enable-libstdcxx-backtrace=yes

libstdc++-v3/ChangeLog:

	* include/debug/formatter.h
	[_GLIBCXX_HAVE_STACKTRACE](__glibcxx_backtrace_state): Declare.
	[_GLIBCXX_HAVE_STACKTRACE](__glibcxx_backtrace_create_state): Declare.
	[_GLIBCXX_HAVE_STACKTRACE](__glibcxx_backtrace_full_callback): Define.
	[_GLIBCXX_HAVE_STACKTRACE](__glibcxx_backtrace_error_callback): Define.
	[_GLIBCXX_HAVE_STACKTRACE](__glibcxx_backtrace_full_func): Define.
	[_GLIBCXX_HAVE_STACKTRACE](__glibcxx_backtrace_full): Declare.
	[_GLIBCXX_HAVE_STACKTRACE](_Error_formatter::_M_backtrace_state): New.
	[_GLIBCXX_HAVE_STACKTRACE](_Error_formatter::_M_backtrace_full): New.
	* src/c++11/debug.cc [_GLIBCXX_HAVE_STACKTRACE](print_backtrace): New.
	(_Error_formatter::_M_error()): Adapt.
	* src/libbacktrace/Makefile.am: Add backtrace.c.
	* src/libbacktrace/Makefile.in: Regenerate.
	* src/libbacktrace/backtrace-rename.h (backtrace_full): New.
	* testsuite/23_containers/vector/debug/assign4_backtrace_neg.cc: New test.
	* doc/xml/manual/debug_mode.xml: Document _GLIBCXX_DEBUG_BACKTRACE.
	* doc/xml/manual/using.xml: Likewise.
2022-08-31 20:51:10 +02:00
Jonathan Wakely
cc4fa7a210 libstdc++: Document linker option for C++23 <stacktrace> [PR105678]
libstdc++-v3/ChangeLog:

	PR libstdc++/105678
	* doc/xml/manual/using.xml: Document -lstdc++_libbacktrace
	requirement for using std::stacktrace. Also adjust -frtti and
	-fexceptions to document non-default (i.e. negative) forms.
	* doc/html/*: Regenerate.
2022-08-22 22:52:25 +01:00
Jonathan Wakely
682e587f10 libstdc++: Fix hyperlink in docs
libstdc++-v3/ChangeLog:

	* doc/xml/manual/prerequisites.xml: Fix attributes for external
	hyperlink.
	* doc/html/manual/setup.html: Regenerate.
2022-05-16 14:54:07 +01:00
Jonathan Wakely
8414dad54a libstdc++: Update C++23 status docs
These are the C++23 proposals supported in the gcc-12 branch.

libstdc++-v3/ChangeLog:

	* doc/xml/manual/status_cxx2023.xml: Update with gcc-12 support.
	* doc/html/*: Regenerate.
2022-05-16 14:53:16 +01:00
Jonathan Wakely
4361867344 libstdc++: Add C++23 status docs
These are the C++23 proposals already supported in the gcc-11 branch.

libstdc++-v3/ChangeLog:

	* doc/xml/manual/intro.xml: Include new chapter.
	* doc/xml/manual/status_cxx2020.xml: Tweak release numbers.
	* doc/xml/manual/status_cxx2023.xml: New file.
	* doc/html/*: Regenerate.
2022-05-16 14:47:34 +01:00
Jonathan Wakely
64648821f1 libstdc++: Fix status docs for <bit> support
libstdc++-v3/ChangeLog:

	* doc/html/manual/status.html: Regenerate.
	* doc/xml/manual/status_cxx2020.xml: Fix supported version for
	C++20 bit operations.
2022-05-16 14:47:34 +01:00
Jonathan Wakely
c829b04bc3 libstdc++: Allow std::swap to find overload for std::exception_ptr
The non-member swap for std::exception_ptr is in a nested namespace and
so can only be found by ADL currently. Add a using-declaration so that
qualified std::swap calls will use the std::exception_ptr::swap member,
instead of the generic std::swap.

There's no new test for this, because the generic std::swap works, it
just does more work than is necessary.

Also tell Doxygen to replace the __exception_ptr namespace with
"__unspecified__" in the generate docs, so the real name is not
documented.

libstdc++-v3/ChangeLog:

	* doc/doxygen/user.cfg.in (PREDEFINED): Replace __exception_ptr
	with "__unspecified__".
	* libsupc++/exception_ptr.h: Improve doxygen docs.
	(__exception_ptr::swap): Also declare in namespace std.
2022-05-13 20:40:04 +01:00
Jonathan Wakely
b584cbdb08 libstdc++: Improve doxygen docs for <mutex>
libstdc++-v3/ChangeLog:

	* doc/doxygen/user.cfg.in (PREDEFINED): Define
	_GTHREAD_USE_MUTEX_TIMEDLOCK macro.
	* include/bits/std_mutex.h (mutex, lock_guard): Use @since and
	@headerfile.
	* include/bits/unique_lock.h (unique_lock): Likewise.
	* include/std/mutex (recursive_mutex, timed_mutex)
	(recursive_timed_mutex, scoped_lock): Likewise.
2022-05-13 13:32:23 +01:00
Jonathan Wakely
a278402216 libstdc++: Improve doxygen docs for some of <memory>
libstdc++-v3/ChangeLog:

	* doc/doxygen/user.cfg.in (PREDEFINED): Define
	_GLIBCXX23_CONSTEXPR macro.
	* include/backward/auto_ptr.h (auto_ptr): Use @deprecated.
	* include/bits/unique_ptr.h (default_delete): Use @since and
	@headerfile.
	* include/std/scoped_allocator: Remove @ingroup from @file
	block.
2022-05-13 13:32:23 +01:00
Jonathan Wakely
171f41f124 libstdc++: Improve doxygen docs for std::allocator
libstdc++-v3/ChangeLog:

	* doc/doxygen/user.cfg.in (PREDEFINED): Define __allocator_base
	so that Doxygen shows the right base-class for std::allocator.
	* include/bits/alloc_traits.h: Improve doxygen docs.
	* include/bits/allocator.h: Likewise.
	* include/bits/new_allocator.h: Likewise.
	* include/ext/new_allocator.h: Likewise.
2022-05-13 13:32:22 +01:00
Jonathan Wakely
1b01963a4e libstdc++: Improve doxygen docs for <regex>
Add @headerfile and @since tags. Improve grouping of non-member
functions via @relates tags.

Mark the std::pair base class of std::sub_match as undocumented, so that
the docs don't show all the related non-member functions are part of the
sub_match API. Use a new macro to re-add the data members for Doxygen
only.

libstdc++-v3/ChangeLog:

	* doc/doxygen/user.cfg.in (PREDEFINED): Define macro
	_GLIBCXX_DOXYGEN_ONLY to expand its argument.
	* include/bits/c++config (_GLIBCXX_DOXYGEN_ONLY): Define.
	* include/bits/regex.h: Improve doxygen docs.
	* include/bits/regex_constants.h: Likewise.
	* include/bits/regex_error.h: Likewise.
2022-05-13 13:32:22 +01:00
Jonathan Wakely
e4905f1185 libstdc++: Add macros for the inline namespace std::_V2
Use macros to open and close the inline namespace _V2 that is used for
ABI versioning of individual components such as chrono::system_clock.

This allows the namespace to be hidden in the docs generated by Doxygen,
so that we document std::foo instead of std::_V2::foo.

This also makes it easy to remove that namespace entirely for the
gnu-versioned-namespace build, where everything is already versioned as
std::__8 and there are no backwards compatibility guarantees.

libstdc++-v3/ChangeLog:

	* doc/doxygen/user.cfg.in (PREDEFINED): Expand new macros to
	nothing.
	* include/bits/c++config (_GLIBCXX_BEGIN_INLINE_ABI_NAMESPACE)
	(_GLIBCXX_END_INLINE_ABI_NAMESPACE): Define new macros.
	* include/bits/algorithmfwd.h (_V2::__rotate): Use new macros
	for the namespace.
	* include/bits/chrono.h (chrono::_V2::system_clock): Likewise.
	* include/bits/stl_algo.h (_V2::__rotate): Likewise.
	* include/std/condition_variable (_V2::condition_variable_any):
	Likewise.
	* include/std/system_error (_V2::error_category): Likewise.
2022-05-13 13:32:22 +01:00
Jonathan Wakely
9c3a8fe34a libstdc++: Disable Doxygen GROUP_NESTED_COMPOUNDS config option
Before Doxygen version 1.9.2 this option is broken (see
https://github.com/doxygen/doxygen/issues/8638 for more details) and
classes are not added to the correct groups by @ingroup and @addtogroup.

Also remove the obsolete CLASS_DIAGRAMS option that causes a warning.

libstdc++-v3/ChangeLog:

	* doc/doxygen/user.cfg.in (GROUP_NESTED_COMPOUNDS): Set to NO.
	(CLASS_DIAGRAMS): Remove obsolete option.
2022-05-13 13:32:21 +01:00
Jonathan Wakely
e03a0a4d73 libstdc++: Update documentation about copyright and GPL notices in tests
There is no need to require FSF copyright for tests that are just
"self-evident" ways to check the API and behaviour of the library.
This is consistent with tests for the compiler, which do not have
copyright and licence notices either.

libstdc++-v3/ChangeLog:

	* doc/xml/manual/test.xml: Remove requirement for copyright and
	GPL notice in tests.
	* doc/html/manual/test.html: Regenerate.
2022-05-06 14:43:38 +01:00
Jonathan Wakely
c644b7df11 libstdc++: Use LTLIBICONV when linking libstdc++.so [PR93602]
This fixes missing libiconv symbols when libstdc++ is built on a system
that has libiconv installed. If the libiconv headers are found then
libstdc++ depends on libiconv_open etc instead of libc's iconv_open. But
without this fix libstdc++ is not linked to the libiconv library that
provides the definitions of those symbols.

As discussed in PR 93602 this changed means that libstdc++.so.6 might
have an rpath pointing to the location of the libiconv.so library. If
that is not desired, then GCC must be configured to link to a static
libiconv.a instead, using either --with-libiconv-type=static or an
in-tree build of libiconv.

libstdc++-v3/ChangeLog:

	PR libstdc++/93602
	* doc/xml/manual/prerequisites.xml: Document libiconv
	workarounds.
	* doc/html/manual/setup.html: Regenerate.
	* src/Makefile.am (CXXLINK): Add $(LTLIBICONV).
	* src/Makefile.in: Regenerate.
2022-04-20 13:54:57 +01:00
Jonathan Wakely
832fcbbc73 libstdc++: Fix incorrect IS number in doc comment
libstdc++-v3/ChangeLog:

	* doc/xml/manual/intro.xml: Fix comment.
2022-04-14 17:31:15 +01:00
Jonathan Wakely
b78e0ce28b libstdc++: Define std::expected for C++23 (P0323R12)
Because this adds a new class template called std::unexpected, we have
to stop declaring the std::unexpected() function (which was deprecated
in C++11 and removed in C++17).

libstdc++-v3/ChangeLog:

	* doc/doxygen/user.cfg.in: Add new header.
	* include/Makefile.am: Likewise.
	* include/Makefile.in: Regenerate.
	* include/precompiled/stdc++.h: Add new header.
	* include/std/version (__cpp_lib_expected): Define.
	* libsupc++/exception [__cplusplus > 202002] (unexpected)
	(unexpected_handler, set_unexpected): Do not declare for C++23.
	* include/std/expected: New file.
	* testsuite/20_util/expected/assign.cc: New test.
	* testsuite/20_util/expected/cons.cc: New test.
	* testsuite/20_util/expected/illformed_neg.cc: New test.
	* testsuite/20_util/expected/observers.cc: New test.
	* testsuite/20_util/expected/requirements.cc: New test.
	* testsuite/20_util/expected/swap.cc: New test.
	* testsuite/20_util/expected/synopsis.cc: New test.
	* testsuite/20_util/expected/unexpected.cc: New test.
	* testsuite/20_util/expected/version.cc: New test.
2022-03-27 18:50:31 +01:00
Jonathan Wakely
12a88e6e20 libstdc++: Deprecate non-standard std::vector<bool>::insert(pos) [PR104559]
The SGI STL and pre-1998 drafts of the C++ standard had a default
argument for vector<bool>::insert(iterator, const bool&) which was
remove by N1051. The default argument is still present in libstdc++ for
some reason. There are no tests verifying it as an extension, so I don't
think it has been kept intentionally.

This removes the default argument but adds an overload without the
second parameter, and adds the deprecated attribute to it. This allows
any code using it to keep working (for now) but with a warning.

libstdc++-v3/ChangeLog:

	PR libstdc++/104559
	* doc/xml/manual/evolution.xml: Document deprecation.
	* doc/html/manual/api.html: Regenerate.
	* include/bits/stl_bvector.h (insert(const_iterator, const bool&)):
	Remove default argument.
	(insert(const_iterator)): New overload with deprecated attribute.
	* testsuite/23_containers/vector/bool/modifiers/insert/104559.cc:
	New test.
2022-02-17 23:44:25 +00:00
Jonathan Wakely
9c186493a7 libstdc++: Update documentation for C++17 deprecations
libstdc++-v3/ChangeLog:

	* doc/xml/manual/evolution.xml: Document deprecations.
	* doc/xml/manual/status_cxx2017.xml: Update status.
	* doc/html/*: Regenerate.
2022-01-19 00:58:26 +00:00
Jonathan Wakely
ac358eef7a libstdc++: Update status tables in manual
libstdc++-v3/ChangeLog:

	* doc/xml/manual/status_cxx2017.xml: Update C++17 status.
	* doc/xml/manual/status_cxx2020.xml: Use 12.1 instead of 12 for
	upcoming release.
	* doc/html/manual/status.html: Regenerate.
2022-01-18 09:51:02 +00:00
Jonathan Wakely
3acb929cc0 libstdc++: Define <stacktrace> header for C++23
Add the <stacktrace> header and a new libstdc++_libbacktrace.a library
that provides the implementation. For now, the new library is only built
if --enable-libstdcxx-backtrace=yes is used. As with the Filesystem TS,
the new library is only provided as a static archive.

libstdc++-v3/ChangeLog:

	* acinclude.m4 (GLIBCXX_ENABLE_BACKTRACE): New macro.
	* configure.ac: Use GLIBCXX_ENABLE_BACKTRACE.
	* include/Makefile.am: Add new header.
	* include/Makefile.in: Regenerate.
	* include/std/stacktrace: New header.
	* include/std/version (__cpp_lib_stacktrace): Define.
	* Makefile.in: Regenerate.
	* config.h.in: Regenerate.
	* configure: Regenerate.
	* doc/Makefile.in: Regenerate.
	* libsupc++/Makefile.in: Regenerate.
	* po/Makefile.in: Regenerate.
	* python/Makefile.in: Regenerate.
	* src/Makefile.am: Regenerate.
	* src/Makefile.in: Regenerate.
	* src/c++11/Makefile.in: Regenerate.
	* src/c++17/Makefile.in: Regenerate.
	* src/c++20/Makefile.in: Regenerate.
	* src/c++98/Makefile.in: Regenerate.
	* src/filesystem/Makefile.in: Regenerate.
	* testsuite/Makefile.in: Regenerate.
	* src/libbacktrace/Makefile.am: New file.
	* src/libbacktrace/Makefile.in: New file.
	* src/libbacktrace/backtrace-rename.h: New file.
	* src/libbacktrace/backtrace-supported.h.in: New file.
	* src/libbacktrace/config.h.in: New file.
	* testsuite/lib/libstdc++.exp (check_effective_target_stacktrace):
	New proc.
	* testsuite/20_util/stacktrace/entry.cc: New test.
	* testsuite/20_util/stacktrace/synopsis.cc: New test.
	* testsuite/20_util/stacktrace/version.cc: New test.
2022-01-17 12:13:02 +00:00
Jonathan Wakely
5a3dc58a1d libstdc++: Document final option names for enabling C++20
libstdc++-v3/ChangeLog:

	* doc/xml/manual/status_cxx2020.xml: Use final C++20 option
	names.
	* doc/html/manual/status.html: Regenerate.
2022-01-17 12:08:37 +00:00
Jonathan Wakely
a326934886 libstdc++: Update C++20 status table
libstdc++-v3/ChangeLog:

	* doc/xml/manual/status_cxx2020.xml: Update.
	* doc/html/manual/status.html: Regenerate.
2022-01-17 00:06:28 +00:00
Jonathan Wakely
7f390f11b4 libstdc++: Document new std::random_device tokens
libstdc++-v3/ChangeLog:

	* doc/xml/manual/status_cxx2011.xml: Document new tokens
	accepted by std::random_device constructor.
	* doc/html/manual/status.html: Regenerate.
2022-01-14 10:14:24 +00:00
Jonathan Wakely
68c2e9e923 libstdc++: Fix and simplify freestanding configuration [PR103866]
This fixes the --disable-hosted-libstdcxx build so that it works with
--without-headers. Currently you need to also use --with-newlib, which
is confusing for users who aren't actually using newlib.

The AM_PROG_LIBTOOL checks are currently skipped for --with-newlib and
--with-avrlibc builds, with this change they are also skipped when using
--without-headers.  It would be nice if using --disable-hosted-libstdcxx
automatically skipped those checks, but GLIBCXX_ENABLE_HOSTED comes too
late to make the AM_PROG_LIBTOOL checks depend on $is_hosted.

The checks for EOF, SEEK_CUR etc. cause the build to fail if there is no
<stdio.h> available.  Unlike most headers, which get a HAVE_FOO_H macro,
<stdio.h> is in autoconf's default includes, so every check tries to
include it unconditionally. This change skips those checks for
freestanding builds.

Similarly, the checks for <stdint.h> types done by GCC_HEADER_STDINT try
to include <stdio.h> and fail for --without-headers builds. This change
skips the use of GCC_HEADER_STDINT for freestanding. We can probably
stop using GCC_HEADER_STDINT entirely, since only one file uses the
gstdint.h header that is generated, and that could easily be changed to
use <stdint.h> instead. That can wait for stage 1.

We also need to skip the GLIBCXX_CROSSCONFIG stage if --without-headers
was used, since we don't have any of the functions it deals with.

The end result of the changes above is that it should not be necessary
for a --disable-hosted-libstdcxx --without-headers build to also use
--with-newlib.

Finally, compile libsupc++ with -ffreestanding when --without-headers is
used, so that <stdint.h> will use <gcc-stdint.h> instead of expecting it
to come from libc.

libstdc++-v3/ChangeLog:

	PR libstdc++/103866
	* acinclude.m4 (GLIBCXX_COMPUTE_STDIO_INTEGER_CONSTANTS): Do
	nothing for freestanding builds.
	(GLIBCXX_ENABLE_HOSTED): Define FREESTANDING_FLAGS.
	* configure.ac: Do not use AC_LIBTOOL_DLOPEN when configured
	with --without-headers.  Do not use GCC_HEADER_STDINT for
	freestanding builds.
	* libsupc++/Makefile.am (HOSTED_CXXFLAGS): Use -ffreestanding
	for freestanding builds.
	* configure: Regenerate.
	* Makefile.in: Regenerate.
	* doc/Makefile.in: Regenerate.
	* include/Makefile.in: Regenerate.
	* libsupc++/Makefile.in: Regenerate.
	* po/Makefile.in: Regenerate.
	* python/Makefile.in: Regenerate.
	* src/Makefile.in: Regenerate.
	* src/c++11/Makefile.in: Regenerate.
	* src/c++17/Makefile.in: Regenerate.
	* src/c++20/Makefile.in: Regenerate.
	* src/c++98/Makefile.in: Regenerate.
	* src/filesystem/Makefile.in: Regenerate.
	* testsuite/Makefile.in: Regenerate.
2022-01-10 12:18:14 +00:00
Jonathan Wakely
e1b8a91e47 libstdc++: Update default -std option in manual
libstdc++-v3/ChangeLog:

	* doc/xml/manual/using.xml: Update documentation around default
	-std option.
	* doc/html/*: Regenerate.
2022-01-10 12:18:14 +00:00
Jonathan Wakely
cebe875f6f libstdc++: Fix example preprocessor command in FAQ [PR103877]
libstdc++-v3/ChangeLog:

	PR libstdc++/103877
	* doc/xml/faq.xml: Add '-x c++' to preprocessor command.
	* doc/html/faq.html: Regenerate.
2022-01-05 13:47:01 +00:00
Jakub Jelinek
7adcbafe45 Update copyright years. 2022-01-03 10:42:10 +01:00
Jonathan Wakely
9e18a25331 libstdc++: Allow std::condition_variable waits to be cancelled [PR103382]
std::condition_variable::wait(unique_lock<mutex>&) is incorrectly marked
noexcept, which means that the __forced_unwind exception used by NPTL
cancellation will terminate the process. It should allow exceptions to
pass through, so that a thread can be cleanly cancelled when waiting on
a condition variable.

The new behaviour is exported as a new version of the symbol, to avoid
an ABI break for existing code linked to the non-throwing definition of
the function. Code linked against older releases will have a reference
to the @GLIBCXX_3.4.11 version, andcode compiled against the new
libstdc++ will get a reference to the @@GLIBCXX_3.4.30 version.

libstdc++-v3/ChangeLog:

	PR libstdc++/103382
	* config/abi/pre/gnu.ver (GLIBCXX_3.4.11): Do not export old
	symbol if .symver renaming is supported.
	(GLIBCXX_3.4.30): Export new symbol if .symver renaming is
	supported.
	* doc/xml/manual/evolution.xml: Document change.
	* doc/html/manual/api.html: Regenerate.
	* include/bits/std_mutex.h (__condvar::wait, __condvar::wait_until):
	Remove noexcept.
	* include/std/condition_variable (condition_variable::wait):
	Likewise.
	* src/c++11/condition_variable.cc (condition_variable::wait):
	Likewise.
	* src/c++11/compatibility-condvar.cc (__nothrow_wait_cv::wait):
	Define nothrow wrapper around std::condition_variable::wait and
	export the old symbol as an alias to it.
	* testsuite/30_threads/condition_variable/members/103382.cc: New test.
2021-12-09 22:58:19 +00:00
Jonathan Wakely
fe9571a35d libstdc++: Fix non-reserved name in std::allocator base class [PR64135]
The possible base classes of std::allocator are new_allocator and
malloc_allocator, which both cause a non-reserved name to be declared in
every program that includes the definition of std::allocator. This is
non-conforming.

This change replaces __gnu_cxx::new_allocator with std::__new_allocator
which is identical except for using a reserved name. The non-standard
extension __gnu_cxx::new_allocator is preserved as a thin wrapper over
std::__new_allocator. There is no problem with the extension using a
non-reserved name now that it's not included by default in other
headers.

The same change could be done to __gnu_cxx::malloc_allocator but as it's
not the default configuration it can wait.

libstdc++-v3/ChangeLog:

	PR libstdc++/64135
	* config/allocator/new_allocator_base.h: Include
	<bits/new_allocator.h> instead of <ext/new_allocator.h>.
	(__allocator_base): Use std::__new_allocator instead of
	__gnu_cxx::new_allocator.
	* doc/xml/manual/allocator.xml: Document new default base class
	for std::allocator.
	* doc/xml/manual/evolution.xml: Likewise.
	* doc/html/*: Regenerate.
	* include/Makefile.am: Add bits/new_allocator.h.
	* include/Makefile.in: Regenerate.
	* include/experimental/memory_resource (new_delete_resource):
	Use std::__new_allocator instead of __gnu_cxx::new_allocator.
	* include/ext/new_allocator.h (new_allocator): Derive from
	std::__new_allocator. Move implementation to ...
	* include/bits/new_allocator.h: New file.
	* testsuite/20_util/allocator/64135.cc: New test.
2021-12-09 22:50:10 +00:00
Jonathan Wakely
e2e98f524f libstdc++: Remove broken std::allocator base classes [PR103340]
The bitmap_allocator, __mt_alloc and __pool_alloc extensions are no
longer suitable for use as the base class of std::allocator, because
they have not been updated to meet the C++20 requirements.  There is a
patch attached to PR 103340 which addresses that, but more work would be
needed to solve the linking errors that occur when the library is
configured to use them.

Using --enable-libstdcxx-allocator=bitmap wouldn't even bootstrap for
the past few years, and I can't find any gcc-testresults reports using
any of these allocators. This patch removes the configure option to use
these as the std::allocator base class. The allocators are still in the
tree and can be used directly, you just can't configure the library to
use one of them as the base class of std::allocator.

libstdc++-v3/ChangeLog:

	PR libstdc++/103340
	PR libstdc++/103400
	PR libstdc++/103381
	* acinclude.m4 (GLIBCXX_ENABLE_ALLOCATOR): Remove mt, bitmap
	and pool options.
	* configure: Regenerate.
	* config/allocator/bitmap_allocator_base.h: Removed.
	* config/allocator/mt_allocator_base.h: Removed.
	* config/allocator/pool_allocator_base.h: Removed.
	* doc/xml/manual/allocator.xml: Update.
	* doc/xml/manual/configure.xml: Update.
	* doc/xml/manual/evolution.xml: Document removal.
	* doc/xml/manual/mt_allocator.xml: Editorial tweaks.
	* doc/html/manual/*: Regenerate.
2021-12-02 16:46:28 +00:00
Jonathan Wakely
74d14778e7 libstdc++: Define std::__is_constant_evaluated() for internal use
This adds std::__is_constant_evaluated() as a C++11 wrapper for
__builtin_is_constant_evaluated, but just returning false if the
built-in isn't supported by the compiler. This allows us to use it
throughout the library without checking __has_builtin every time.

Some uses in std::vector and std::string can only be constexpr when the
std::is_constant_evaluated() function actually works, so we might as
well guard them with a relevant macro and call that function directly,
rather than the built-in or std::__is_constant_evaluated().

The remaining checks of the __cpp_lib_is_constant_evaluated macro could
now be replaced by checking __cplusplus >= 202002 instead, but there's
no practical difference. We still need some kind of preprocessor check
there anyway.

libstdc++-v3/ChangeLog:

	* doc/doxygen/user.cfg.in (PREDEFINED): Change macro name.
	* include/bits/allocator.h (allocate, deallocate): Use
	std::__is_constant_evaluated() unconditionally, instead of
	checking whether std::is_constant_evaluated() (or the built-in)
	can be used.
	* include/bits/basic_string.h: Check new macro. call
	std::is_constant_evaluated() directly in C++20-only code that is
	guarded by a suitable macro.
	* include/bits/basic_string.tcc: Likewise.
	* include/bits/c++config (__is_constant_evaluated): Define.
	(_GLIBCXX_HAVE_BUILTIN_IS_CONSTANT_EVALUATED): Replace with ...
	(_GLIBCXX_HAVE_IS_CONSTANT_EVALUATED): New macro.
	* include/bits/char_traits.h (char_traits): Replace conditional
	calls to std::is_constant_evaluated with unconditional calls to
	std::__is_constant_evaluated.
	* include/bits/cow_string.h: Use new macro.
	* include/bits/ranges_algobase.h (__copy_or_move): Replace
	conditional calls to std::is_constant_evaluated with unconditional
	calls to std::__is_constant_evaluated.
	(__copy_or_move_backward, __fill_n_fn): Likewise.
	* include/bits/ranges_cmp.h (ranges::less): Likewise.
	* include/bits/stl_algobase.h (lexicographical_compare_three_way):
	Likewise.
	* include/bits/stl_bvector.h: Call std::is_constant_evaluated
	directly in C++20-only code that is guarded by a suitable macro.
	* include/bits/stl_construct.h (_Construct, _Destroy, _Destroy_n):
	Replace is_constant_evaluated with __is_constant_evaluated.
	* include/bits/stl_function.h (greater, less, greater_equal)
	(less_equal): Replace __builtin_is_constant_evaluated and
	__builtin_constant_p with __is_constant_evaluated.
	* include/bits/stl_vector.h: Call std::is_constant_evaluated()
	in C++20-only code.
	* include/debug/helper_functions.h (__check_singular): Use
	__is_constant_evaluated instead of built-in, or remove check
	entirely.
	* include/std/array (operator<=>): Use __is_constant_evaluated
	unconditionally.
	* include/std/bit (__bit_ceil): Likewise.
	* include/std/type_traits (is_constant_evaluated): Define using
	'if consteval' if possible.
	* include/std/version: Use new macro.
	* libsupc++/compare: Use __is_constant_evaluated instead of
	__builtin_is_constant_evaluated.
	* testsuite/23_containers/array/tuple_interface/get_neg.cc:
	Adjust dg-error lines.
2021-12-01 15:00:33 +00:00
Jonathan Wakely
67013a2f71 libstdc++: Use gender-agnostic pronoun in docs
libstdc++-v3/ChangeLog:

	* doc/xml/manual/debug_mode.xml: Replace "his or her" with "they".
	* doc/html/manual/debug_mode_design.html: Regenerate.
2021-11-30 13:08:50 +00:00
Jonathan Wakely
f4130a3eb5 libstdc++: Deprecate std::unexpected and handler functions
These functions have been deprecated since C++11, and were removed in
C++17. The proposal P0323 wants to reuse the name std::unexpected for a
class template, so we will need to stop defining the current function
for C++23 anyway.

This marks them as deprecated for C++11 and up, to warn users they won't
continue to be available. It disables them for C++17 and up, unless the
_GLIBCXX_USE_DEPRECATED macro is defined.

The <unwind-cxx.h> header uses std::unexpected_handler in the public
API, but since that type is the same as std::terminate_handler we can
just use that instead, to avoid warnings about it being deprecated.

libstdc++-v3/ChangeLog:

	* doc/xml/manual/evolution.xml: Document deprecations.
	* doc/html/*: Regenerate.
	* libsupc++/exception (unexpected_handler, unexpected)
	(get_unexpected, set_unexpected): Add deprecated attribute.
	Do not define without _GLIBCXX_USE_DEPRECATED for C++17 and up.
	* libsupc++/eh_personality.cc (PERSONALITY_FUNCTION): Disable
	deprecated warnings.
	* libsupc++/eh_ptr.cc (std::rethrow_exception): Likewise.
	* libsupc++/eh_terminate.cc: Likewise.
	* libsupc++/eh_throw.cc (__cxa_init_primary_exception):
	Likewise.
	* libsupc++/unwind-cxx.h (struct __cxa_exception): Use
	terminate_handler instead of unexpected_handler.
	(struct __cxa_dependent_exception): Likewise.
	(__unexpected): Likewise.
	* testsuite/18_support/headers/exception/synopsis.cc: Add
	dg-warning for deprecated warning.
	* testsuite/18_support/exception_ptr/60612-unexpected.cc:
	Disable deprecated warnings.
	* testsuite/18_support/set_unexpected.cc: Likewise.
	* testsuite/18_support/unexpected_handler.cc: Likewise.

gcc/testsuite/ChangeLog:

	* g++.dg/cpp0x/lambda/lambda-eh2.C: Add dg-warning for new
	deprecation warnings.
	* g++.dg/cpp0x/noexcept06.C: Likewise.
	* g++.dg/cpp0x/noexcept07.C: Likewise.
	* g++.dg/eh/forced3.C: Likewise.
	* g++.dg/eh/unexpected1.C: Likewise.
	* g++.old-deja/g++.eh/spec1.C: Likewise.
	* g++.old-deja/g++.eh/spec2.C: Likewise.
	* g++.old-deja/g++.eh/spec3.C: Likewise.
	* g++.old-deja/g++.eh/spec4.C: Likewise.
	* g++.old-deja/g++.mike/eh33.C: Likewise.
	* g++.old-deja/g++.mike/eh34.C: Likewise.
	* g++.old-deja/g++.mike/eh50.C: Likewise.
	* g++.old-deja/g++.mike/eh51.C: Likewise.
2021-11-04 20:53:29 +00:00
Jonathan Wakely
394f60e6ed libstdc++: Improve generated man pages for libstdc++
The man pages generated by Doxygen show internal header files, not the
standard headers that users actually care about. The run_doxygen script
uses the doc/doxygen/stdheader.cc program to address that, but it
doesn't work. It only tries to fix headers with underscores in the
names, which doesn't work for <bits/align.h> or <bits/fsteam.tcc>.  It
isn't prepared for the strings like "bits/stl_set\&.h" that are produced
by Doxygen. It doesn't know about many headers that have been added
since it was written. And the run_doxygen script fails to use its output
correctly to modify the man pages. Additionally, run_doxygen doesn't
know about new nested namespaces like std::filesystem and std::ranges.

This change rewrites the stdheader.cc program to do a better job of
finding the right header. The run_doxygen script now uses the just-built
compiler to build stdheader.cc and actually uses its output. And the
script now knows about other nested namespaces.

The stdheader.cc program might be unnecessary if we consistently used
@headername tags in the Doxygen comments, but we don't (and probably
never will).

A problem that remains after this change is that all the free function
defined in namespace std get dumped into a single man page for std(3),
without detailed descriptions. We don't even install that std(3) page,
but remove it before installation. That means only classes are
documented in man pages (including many internal ones that should not be
publicly documented such as _Deque_base and _Tuple_impl).

libstdc++-v3/ChangeLog:

	* doc/doxygen/stdheader.cc: Refactor. Use C++23. Add new
	headers.
	* scripts/run_doxygen: Fix post-processing of #include
	directives in man pages. Use new xg++ to compile helper program.
2021-10-21 22:24:57 +01:00
Jonathan Wakely
04d392e843 libstdc++: Fix doxygen generation to work with relative paths
In r12-826 I tried to remove some redundant steps from the doxygen
build, but they are needed when configure is run as a relative path. The
use of pwd is to resolve the relative path to an absolute one.

libstdc++-v3/ChangeLog:

	* doc/Makefile.am (stamp-html-doxygen, stamp-html-doxygen)
	(stamp-latex-doxygen, stamp-man-doxygen): Fix recipes for
	relative ${top_srcdir}.
	* doc/Makefile.in: Regenerate.
2021-10-19 16:07:41 +01:00
Jonathan Wakely
bd0df30a7b libstdc++: Update documentation that only refers to c++98 and c++11
Signed-off-by: Jonathan Wakely <jwakely@redhat.com>

libstdc++-v3/ChangeLog:

	* doc/xml/manual/using.xml: Generalize to apply to more than
	just -std=c++11.
	* doc/html/manual/using_macros.html: Regenerate.
2021-09-16 23:06:38 +01:00
Jonathan Wakely
6d692ef43b libstdc++: Update C++20 status table for layout-compatibility traits
Signed-off-by: Jonathan Wakely <jwakely@redhat.com>

libstdc++-v3/ChangeLog:

	* doc/xml/manual/status_cxx2020.xml: Update table.
	* doc/html/manual/status.html: Regenerate.
2021-08-24 16:15:48 +01:00
Jonathan Wakely
c5e0f954ae libstdc++: Move status table entry to be with other ranges papers
Signed-off-by: Jonathan Wakely <jwakely@redhat.com>

libstdc++-v3/ChangeLog:

	* doc/xml/manual/status_cxx2020.xml: Move row  earlier in table.
	* doc/html/manual/status.html: Regenerate.
2021-08-19 15:04:19 +01:00
Jonathan Wakely
778044ccf5 libstdc++: Update Doxygen config template to Doxygen 1.9.2
This adds my new SHOW_HEADERFILE option, and removes some obsolete
options.

Signed-off-by: Jonathan Wakely <jwakely@redhat.com>

libstdc++-v3/ChangeLog:

	* doc/doxygen/user.cfg.in: Update to Doxygen 1.9.2
2021-08-19 14:57:42 +01:00
Jonathan Wakely
926d4a71c7 libstdc++: Document P1739R4 status [PR100139]
We should document the status of this unimplemented feature.

Signed-off-by: Jonathan Wakely <jwakely@redhat.com>

libstdc++-v3/ChangeLog:

	PR libstdc++/100139
	* doc/xml/manual/status_cxx2020.xml: Add P1739R4 to status table.
	* doc/html/manual/status.html: Regenerate.
2021-08-19 13:02:12 +01:00
Jonathan Wakely
aba938d6c3 libstdc++: Enable doxygen processing for C++20 components
Improve grouping, add @since and @deprecated information.

Signed-off-by: Jonathan Wakely <jwakely@redhat.com>

libstdc++-v3/ChangeLog:

	* doc/doxygen/user.cfg.in (PREDEFINED): Enable doxygen
	processing for C++20 components and components that depend on
	compiler features.
	* include/bits/stl_algo.h (random_shuffle): Use @deprecated.
	* include/std/type_traits: Improve doxygen comments for C++20
	traits.
2021-08-18 15:02:31 +01:00
Jonathan Wakely
7f2f4b8791 libstdc++: Deprecate std::random_shuffle for C++14
The std::random_shuffle algorithm was removed in C++14 (without
deprecation). This adds the deprecated attribute for C++14 and later, so
that users are warned they should not be using it in those dialects.

Signed-off-by: Jonathan Wakely <jwakely@redhat.com>

libstdc++-v3/ChangeLog:

	* doc/xml/manual/evolution.xml: Document deprecation.
	* doc/html/*: Regenerate.
	* include/bits/c++config (_GLIBCXX14_DEPRECATED): Define.
	(_GLIBCXX14_DEPRECATED_SUGGEST): Define.
	* include/bits/stl_algo.h (random_shuffle): Deprecate for C++14
	and later.
	* testsuite/25_algorithms/headers/algorithm/synopsis.cc: Adjust
	for C++11 and C++14 changes to std::random_shuffle and
	std::shuffle.
	* testsuite/25_algorithms/random_shuffle/1.cc: Add options to
	use deprecated algorithms.
	* testsuite/25_algorithms/random_shuffle/59603.cc: Likewise.
	* testsuite/25_algorithms/random_shuffle/moveable.cc: Likewise.
	* testsuite/25_algorithms/random_shuffle/requirements/explicit_instantiation/2.cc:
	Likewise.
	* testsuite/25_algorithms/random_shuffle/requirements/explicit_instantiation/pod.cc:
	Likewise.
2021-08-03 15:30:35 +01:00
Jonathan Wakely
254e5d19a1 libstdc++: Restore __gnu_debug::array [PR100682]
As the PR points out, we removed the debug version of std::array without
any period of deprecation. Although std::array contains all the actual
debug checks now, removing the <debug/arrray> header breaks any code
that was using that explicitly. The manual still lists doing that as
supported.

This restores the <debug/array> header, but simply defines
__gnu_debug::array as an alias for std::array, and declares the alias
with the deprecated attribute. The docs are updated to match.

Signed-off-by: Jonathan Wakely <jwakely@redhat.com>

libstdc++-v3/ChangeLog:

	PR libstdc++/100682
	* doc/xml/manual/debug_mode.xml: Update documentation about
	debug capability of std::array.
	* doc/html/*: Regenerate.
	* include/debug/array: New file.
2021-07-22 13:53:57 +01:00
Jonathan Wakely
f2ce64b53f libstdc++: Improvements to Doxygen markup
This attempst to improve the doxygen output to work around what seems to
be some bugs in doxygen (issues 8635 and 8638).

The @addtogroup command doesn't work for entities inside a nested
namespace (see 8635) so we need to close and reopen groups on entering
and elaving nested namespaces. This fixes the problem that
chrono::duration and chrono::time_point were not documented in the
"Time" documentation group. I am unable to make the path classes appear
as part of their relevant groups (File System and Filesystem TS), nor
the contents of <exception> or <system_error>. I have made some minor
improvements to the docs for those types, including starting to address
PR 97001 by adding @since to the doxygen comments.

This change also excludes the <experimental/bits/net.h> header from
Doxygen processing, so we don't get an unwanted "Networking-ts" group
in the documentation.

Signed-off-by: Jonathan Wakely <jwakely@redhat.com>

libstdc++-v3/ChangeLog:

	* doc/doxygen/doxygroups.cc: Fix docs for std::literals.
	* doc/doxygen/user.cfg.in: Exclude the Networking TS header.
	Add some more predefined macros.
	* include/bits/fs_fwd.h: Move @addtogroup commands inside
	namespaces. Add better documentation.
	* include/bits/fs_path.h: Likewise.
	* include/experimental/bits/fs_fwd.h: Likewise.
	* include/experimental/bits/fs_path.h: Likewise.
	* include/ext/throw_allocator.h: Fix typo and improve docs.
	* include/std/chrono: Move @addtogroup commands.
	* include/std/system_error: Move @addtogroup commands.
	* libsupc++/exception: Improve documentation.
	* libsupc++/exception.h: Add @since documentation.
2021-07-01 18:45:48 +01:00
Jonathan Wakely
6963c3b9ed libstdc++: Improve Doxygen documentation groups [PR 101258]
This defines some new Doxygen groups for C++17 variable templates and
for the contents of <experimental/type_traits>. By documenting the group
as a whole and adding each template to a group we don't need to document
them individually.

Also mark more internals with "@cond undocumented" so that Doxygen
ignores them by default. Also make Doxygen process <experimental/simd>.

For some reason, many of the class templates in <type_traits> do not
appear in the "Metaprogramming" group. For example, add_cv,
remove_extent, and all the is_xxx_constructible and is_xxx_assignable
traits. For some reason, Doxygen doesn't include them in the group,
despite doing it correctly for other traits in the same header.

Signed-off-by: Jonathan Wakely <jwakely@redhat.com>

libstdc++-v3/ChangeLog:

	PR libstdc++/101258
	* doc/doxygen/user.cfg.in (INPUT): Add <experimental/simd>.
	(COLS_IN_ALPHA_INDEX): Remove obsolete tag.
	(PREDEFINED): Add/fix some more macros that need to be expanded.
	* include/bits/random.h: Stop Doxygen from documenting internal
	implementation details.
	* include/bits/random.tcc: Likewise.
	* include/bits/this_thread_sleep.h: Fix @file name.
	* include/experimental/bits/simd.h: Add to Doxygen group. Do not
	document internal implementation details.
	* include/experimental/bits/simd_detail.h: Do not document
	internal implementation details.
	* include/experimental/simd: Define Doxygen groups.
	* include/experimental/type_traits: Improve documentation for
	the header file. Define groups. Use @since commands.
	* include/std/scoped_allocator (scoped_allocator_adaptor): Move
	declaration before undocumented region.
	* include/std/type_traits (true_type, false_type): Use using
	declaration instead of typedef.
	(is_invocable_v, is_nothrow_invocable_v, is_invocable_r_v)
	(is_nothrow_invocable_r_v): Move definitions next to other C++17
	variable templates.
	Do not document internal implementation details. Move misplaced
	group-end command. Define group for variable templates.
	* include/std/variant: Do not document internal implementation
	details.
	* testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error
	line number.
2021-07-01 00:25:46 +01:00
Jonathan Wakely
e5c422b7d8 libstdc++: Implement LWG 415 for std::ws
For C++11 std::ws changed to be an unformatted input function, meaning
it constructs a sentry and sets badbit on exceptions.

libstdc++-v3/ChangeLog:

	* doc/xml/manual/intro.xml: Document LWG 415 change.
	* doc/html/manual/bugs.html: Regenerate.
	* include/bits/istream.tcc (ws): Create sentry and catch
	exceptions.
	* testsuite/27_io/basic_istream/ws/char/lwg415.cc: New test.
	* testsuite/27_io/basic_istream/ws/wchar_t/lwg415.cc: New test.
2021-06-28 13:34:49 +01:00
Jonathan Wakely
f8c5b542f6 libstdc++: Implement LWG 581 for std:ostream::flush()
LWG 581 changed ostream::flush() to an unformatted output function for
C++11, but it was never implemented in libstdc++.

libstdc++-v3/ChangeLog:

	* doc/xml/manual/intro.xml: Document LWG 581 change.
	* doc/html/manual/bugs.html: Regenerate.
	* include/bits/basic_ios.tcc: Whitespace.
	* include/bits/ostream.tcc (basic_ostream::flush()): Construct
	sentry.
	* testsuite/27_io/basic_ostream/flush/char/2.cc: Check
	additional cases.
	* testsuite/27_io/basic_ostream/flush/char/exceptions_badbit_throw.cc:
	Likewise.
	* testsuite/27_io/basic_ostream/flush/wchar_t/2.cc: Likewise.
	* testsuite/27_io/basic_ostream/flush/wchar_t/exceptions_badbit_throw.cc:
	Likewise.
2021-06-25 18:47:39 +01:00
Jonathan Wakely
f78f25f438 libstdc++: Add feature test macro for heterogeneous lookup in unordered containers
Also update the C++20 status docs.

Signed-off-by: Jonathan Wakely <jwakely@redhat.com>

libstdc++-v3/ChangeLog:

	* doc/xml/manual/status_cxx2020.xml:
	* doc/html/*: Regenerate.
	* include/bits/hashtable.h (__cpp_lib_generic_unordered_lookup):
	Define.
	* include/std/version (__cpp_lib_generic_unordered_lookup):
	Define.
	* testsuite/23_containers/unordered_map/operations/1.cc: Check
	feature test macro.
	* testsuite/23_containers/unordered_set/operations/1.cc:
	Likewise.
2021-06-04 15:59:37 +01:00
Jonathan Wakely
ca35586cf5 libstdc++: Improve punctuation in implementation status docs
Signed-off-by: Jonathan Wakely <jwakely@redhat.com>

libstdc++-v3/ChangeLog:

	* doc/xml/manual/status_cxxis29124.xml: Improve punctuation.
	* doc/xml/manual/status_cxxtr1.xml: Likewise.
	* doc/xml/manual/status_cxxtr24733.xml: Likewise.
	* doc/html/*: Regenerate.
2021-06-02 12:32:13 +01:00
Gerald Pfeifer
a0a7adeea3 libstdc++: Remove "Intel Compilers" bibliography entry
The original link redirects to a very generic page that advertises
lots of tools and other things, just not this.

libstdc++-v3/ChangeLog:

2021-05-31  Gerald Pfeifer  <gerald@pfeifer.com>

	* doc/xml/manual/abi.xml: Remove dead reference to "Intel
	Compilers for Linux: Compatibility with GNU Compilers" article.
	* doc/html/manual/abi.html: Regenerate.
2021-05-31 00:27:17 +02:00
Jonathan Wakely
e3b6d3a887 libstdc++: Allow lualatex to be used for Doxygen PDF
This allows the Doxygen PDF to be built using lualatex instead of
pdflatex, which solves a problem with pdflatex running out of memory
sometimes. This is done by adding a --latex_cmd option to the
run_doxygen script, which then sets the specified command in the
generated user.cfg file used by Doxygen. The makefile is adjusted to
pass --latex_cmd=$(LATEX_CMD) to the script, so using running make with
LATEX_CMD=lualatex will override the default.

Additionally, this does some refactoring of the doc/Makefile.am rules
and the run_doxygen script.

libstdc++-v3/ChangeLog:

	* doc/Makefile.am: Simplify doxygen recipes and use --latex_cmd.
	* doc/Makefile.in: Regenerate.
	* doc/doxygen/user.cfg.in (LATEX_CMD_NAME): Add placeholder
	value.
	* scripts/run_doxygen (print_usage): Always print to stdout and
	do not exit.
	(fail): New function for exiting on error.
	(parse_options): Handle --latex_cmd. Do not treat --help the
	same as errors. Simplify handling of required arguments.
2021-05-17 12:13:41 +01:00
Gerald Pfeifer
f58541b2a4 libstdc++: Move unix.org reference to https
libstdc++-v3/ChangeLog:

	* doc/xml/manual/ctype.xml: Move unix.org reference to https.
	* doc/html/manual/facets.html: Regenerate.
2021-05-03 02:02:25 +02:00
Jonathan Wakely
43a35b26e2 libstdc++: Reduce output of 'make doc-pdf-doxygen'
Use '@' to prevent Make from echoing the recipe, so that users don't see
this every time:

  if [ -f ${doxygen_pdf} ]; then
    mv ${doxygen_pdf} ${api_pdf} ;
    echo ":: PDF file is ${api_pdf}";
  else
    echo "... error";
    grep -F 'LaTeX Error' ${doxygen_outdir}/latex/refman.log;
    grep -F 'TeX capacity exceeded, sorry' ${doxygen_outdir}/latex/refman.log;
    exit 12;
  fi

The presence of the "error" strings in the output makes it look like an
error happened. By suppressing the echoing user's will only see "error"
if the 'else' branch is taken.

libstdc++-v3/ChangeLog:

	* doc/Makefile.am (stamp-pdf-doxygen): Improve comment about
	dealing with errors. Use '@' to prevent shell command being
	echoed.
	* doc/Makefile.in: Regenerate.
2021-04-28 14:49:28 +01:00
Jonathan Wakely
989e512f71 libstdc++: Remove outdated docs on libg++ and libstdc++-v2
The libstdc++-v3 manual doesn't need to document how to use its
predecessors.

libstdc++-v3/ChangeLog:

	* doc/xml/manual/backwards_compatibility.xml: Remove porting
	notes for libg++ and libstdc++-v2, and bibliography.
	* doc/html/*: Regenerated.
2021-04-13 16:34:15 +01:00
Jonathan Wakely
be8d5f99f5 libstdc++: Improve error reporting if PDF generation fails
If pdflatex runs out of memory the build fails with no hint what's
wrong. This adds another grep command to the makefile so that an
out-of-memory error will result in more information being shown.

As suggested in https://bugzilla.redhat.com/show_bug.cgi?id=1841056
using lualatex can be used as a workaround.

libstdc++-v3/ChangeLog:

	* doc/Makefile.am (stamp-pdf-doxygen): Also grep for
	out-of-memory error in log file.
	* doc/Makefile.in: Regenerate.
2021-04-08 21:42:59 +01:00
Jonathan Wakely
e19afa0645 libstdc++: Adjust link to PSTL upstream (again)
The LLVM project renamed their default branch to 'main'.

libstdc++-v3/ChangeLog:

	* doc/xml/manual/status_cxx2017.xml: Adjust link for PSTL.
	* doc/html/manual/status.html: Regenerate.
2021-03-29 14:14:00 +01:00
Jonathan Wakely
ed255fd5ed libstdc++: Document library versioning for GCC 11
libstdc++-v3/ChangeLog:

	* doc/xml/manual/abi.xml: Document versioning for GCC 11.
	* doc/html/manual/abi.html: Regenerate.
2021-02-25 15:35:59 +00:00
Jonathan Wakely
1dfd95f0a0 libstdc++: Fix filesystem::rename on Windows [PR 98985]
The _wrename function won't overwrite an existing file, so use
MoveFileEx instead. That allows renaming directories over files, which
POSIX doesn't allow, so check for that case explicitly and report an
error.

Also document the deviation from the expected behaviour, and add a test
for filesystem::rename which was previously missing.

The Filesystem TS experimental::filesystem::rename doesn't have that
extra code to handle directories correctly, so the relevant parts of the
new test are not run on Windows.

libstdc++-v3/ChangeLog:

	* doc/xml/manual/status_cxx2014.xml: Document implementation
	specific properties of std::experimental::filesystem::rename.
	* doc/xml/manual/status_cxx2017.xml: Document implementation
	specific properties of std::filesystem::rename.
	* doc/html/*: Regenerate.
	* src/c++17/fs_ops.cc (fs::rename): Implement correct behaviour
	for directories on Windows.
	* src/filesystem/ops-common.h (__gnu_posix::rename): Use
	MoveFileExW on Windows.
	* testsuite/27_io/filesystem/operations/rename.cc: New test.
	* testsuite/experimental/filesystem/operations/rename.cc: New test.
2021-02-12 15:29:50 +00:00
Jonathan Wakely
ce43c90604 libstdc++: Document when C++11/14/17 support became stable [PR 99058]
libstdc++-v3/ChangeLog:

	PR libstdc++/99058
	* doc/xml/manual/status_cxx2011.xml: Document when support
	became stable.
	* doc/xml/manual/status_cxx2014.xml: Likewise.
	* doc/xml/manual/status_cxx2017.xml: Likewise.
	* doc/html/manual/status.html: Regenerate.
2021-02-11 17:28:16 +00:00
Jonathan Wakely
886f9f519c libstdc++: Fix markup for status tables in docs
libstdc++-v3/ChangeLog:

	* doc/xml/manual/status_cxx2011.xml: Remove stray table cell.
	* doc/xml/manual/status_cxx2014.xml: Likewise.
	* doc/xml/manual/status_cxx2017.xml: Likewise.
	* doc/html/manual/status.html: Regenerate.
2021-02-02 09:55:52 +00:00
Jonathan Wakely
90c9b2c176 libstdc++: Update C++17 status table for <charconv>
libstdc++-v3/ChangeLog:

	* doc/xml/manual/status_cxx2011.xml: Update std::call_once
	status.
	* doc/xml/manual/status_cxx2014.xml: Likewise.
	* doc/xml/manual/status_cxx2017.xml: Likewise. Update
	std::from_chars and std::to_chars status. Fix formatting.
	* doc/html/manual/status.html: Regenerate.
2021-02-01 16:06:45 +00:00
Jonathan Wakely
3670dbe490 libstdc++: Regenerate libstdc++ HTML docs
libstdc++-v3/ChangeLog:

	* doc/xml/manual/status_cxx2017.xml: Replace invalid entity.
	* doc/html/*: Regenerate.
2021-01-27 17:53:07 +00:00
Matthias Kretz
2bcceb6fc5 libstdc++: Add std::experimental::simd from the Parallelism TS 2
Adds <experimental/simd>.

This implements the simd and simd_mask class templates via
[[gnu::vector_size(N)]] data members. It implements overloads for all of
<cmath> for simd. Explicit vectorization of the <cmath> functions is not
finished.

The majority of functions are marked as [[gnu::always_inline]] to enable
quasi-ODR-conforming linking of TUs with different -m flags.
Performance optimization was done for x86_64.  ARM, Aarch64, and POWER
rely on the compiler to recognize reduction, conversion, and shuffle
patterns.

Besides verification using many different machine flages, the code was
also verified with different fast-math flags.

libstdc++-v3/ChangeLog:

	* doc/xml/manual/status_cxx2017.xml: Add implementation status
	of the Parallelism TS 2. Document implementation-defined types
	and behavior.
	* include/Makefile.am: Add new headers.
	* include/Makefile.in: Regenerate.
	* include/experimental/simd: New file. New header for
	Parallelism TS 2.
	* include/experimental/bits/numeric_traits.h: New file.
	Implementation of P1841R1 using internal naming. Addition of
	missing IEC559 functionality query.
	* include/experimental/bits/simd.h: New file. Definition of the
	public simd interfaces and general implementation helpers.
	* include/experimental/bits/simd_builtin.h: New file.
	Implementation of the _VecBuiltin simd_abi.
	* include/experimental/bits/simd_converter.h: New file. Generic
	simd conversions.
	* include/experimental/bits/simd_detail.h: New file. Internal
	macros for the simd implementation.
	* include/experimental/bits/simd_fixed_size.h: New file. Simd
	fixed_size ABI specific implementations.
	* include/experimental/bits/simd_math.h: New file. Math
	overloads for simd.
	* include/experimental/bits/simd_neon.h: New file. Simd NEON
	specific implementations.
	* include/experimental/bits/simd_ppc.h: New file. Implement bit
	shifts to avoid invalid results for integral types smaller than
	int.
	* include/experimental/bits/simd_scalar.h: New file. Simd scalar
	ABI specific implementations.
	* include/experimental/bits/simd_x86.h: New file. Simd x86
	specific implementations.
	* include/experimental/bits/simd_x86_conversions.h: New file.
	x86 specific conversion optimizations. The conversion patterns
	work around missing conversion patterns in the compiler and
	should be removed as soon as PR85048 is resolved.
	* testsuite/experimental/simd/standard_abi_usable.cc: New file.
	Test that all (not all fixed_size<N>, though) standard simd and
	simd_mask types are usable.
	* testsuite/experimental/simd/standard_abi_usable_2.cc: New
	file. As above but with -ffast-math.
	* testsuite/libstdc++-dg/conformance.exp: Don't build simd tests
	from the standard test loop. Instead use
	check_vect_support_and_set_flags to build simd tests with the
	relevant machine flags.
2021-01-27 16:37:26 +00:00
Jonathan Wakely
0db5f48848 libstdc++: Remove <debug/array> from Doxygen config
This header was removed recently, so Doxygen shouldn't try to process
it.

libstdc++-v3/ChangeLog:

	* doc/doxygen/user.cfg.in (INPUT): Remove include/debug/array.
2021-01-13 10:29:45 +00:00
Thomas Rodgers
b7c3f201be libstdc++: Add support for C++20 barriers
Adds <barrier>

libstdc++-v3/ChangeLog:

	* doc/doxygen/user.cfg.in: Add new header.
	* include/Makefile.am (std_headers): likewise.
	* include/Makefile.in: Regenerate.
	* include/precompiled/stdc++.h: Add new header.
	* include/std/barrier: New file.
	* include/std/version: Add __cpp_lib_barrier feature test macro.
	* testsuite/30_threads/barrier/1.cc: New test.
	* testsuite/30_threads/barrier/2.cc: Likewise.
	* testsuite/30_threads/barrier/arrive_and_drop.cc: Likewise.
	* testsuite/30_threads/barrier/arrive_and_wait.cc: Likewise.
	* testsuite/30_threads/barrier/arrive.cc: Likewise.
	* testsuite/30_threads/barrier/completion.cc: Likewise.
2021-01-07 12:52:37 -08:00
Jakub Jelinek
99dee82307 Update copyright years. 2021-01-04 10:26:59 +01:00
Gerald Pfeifer
15b99a6b83 libstdc++: Update link to Arm ABI
libstdc++-v3:

2020-12-27  Gerald Pfeifer  <gerald@pfeifer.com>

	* doc/xml/manual/abi.xml: Update link to Arm ABI.
	* doc/html/manual/abi.html: Regenerate.
2020-12-27 21:25:32 +01:00
Gerald Pfeifer
0e283e2c9f libstdc++: Move Valgrind references to https
libstdc++-v3:

2020-12-27  Gerald Pfeifer  <gerald@pfeifer.com>

	* doc/xml/manual/debug.xml: Move Valgrind references to https.
	* doc/html/manual/debug.html: Regenerate.
2020-12-27 11:17:21 +01:00
Gerald Pfeifer
9d426e4dbc libstdc++: Update link to Intel/GNU compatibility paper
libstdc++-v3:

2020-12-26  Gerald Pfeifer  <gerald@pfeifer.com>

	* doc/xml/manual/abi.xml: Update link to Intel's compatibility
	with GNU compilers document.
	* doc/html/manual/abi.html: Regenerate.
2020-12-26 13:37:48 +01:00
Gerald Pfeifer
a746898dff libstdc++: Update link to Java docs
libstdc++-v3:

2020-12-25  Gerald Pfeifer  <gerald@pfeifer.com>

	* doc/xml/manual/messages.xml: Update link to Java docs.
	* doc/html/manual/facets.html: Ditto.
2020-12-25 19:14:35 +01:00
Gerald Pfeifer
4ee8e5949a libstdc++: Convert three doxygen.nl links to https
libstdc++-v3:
2020-12-25  Gerald Pfeifer  <gerald@pfeifer.com>

	* doc/xml/manual/documentation_hacking.xml: Convert three links
	to doxygen.nl to https.
	* doc/html/manual/documentation_hacking.html: Regenerate.
2020-12-25 15:20:43 +01:00
Jonathan Wakely
7c1e7eed89 libstdc++: Add C++ runtime support for new 128-bit long double format
This adds support for the new __ieee128 long double format on
powerpc64le targets.

Most of the complexity comes from wanting a single libstdc++.so library
that contains the symbols needed by code compiled with both
-mabi=ibmlongdouble and -mabi=ieeelongdouble (and not forgetting
-mlong-double-64 as well!)

In a few places this just requires an extra overload, for example
std::from_chars has to be overloaded for both forms of long double.
That can be done in a single translation unit that defines overloads
for 'long double' and also '__ieee128', so that user code including
<charconv> will be able to link to a definition for either type of long
double. Those are the easy cases.

The difficult parts are (as for the std::string ABI transition) the I/O
and locale facets. In order to be able to write either form of long
double to an ostream such as std::cout we need the locale to contain a
std::num_put facet that can handle both forms. The same approach is
taken as was already done for supporting 64-bit long double and 128-bit
long double: adding extra overloads of do_put to the facet class. On
targets where the new long double code is enabled, the facets that are
registered in the locale at program startup have additional overloads so
that they can work with any long double type. Where this fails to work
is if user code installs its own facet, which will probably not have the
additional overloads and so will only be able to output one or the other
type. In practice the number of users expecting to be able to use their
own locale facets in code using a mix of -mabi=ibmlongdouble and
-mabi=ieeelongdouble is probably close to zero.

libstdc++-v3/ChangeLog:

	* Makefile.in: Regenerate.
	* config.h.in: Regenerate.
	* config/abi/pre/gnu.ver: Make patterns less greedy.
	* config/os/gnu-linux/ldbl-ieee128-extra.ver: New file with patterns
	for IEEE128 long double symbols.
	* configure: Regenerate.
	* configure.ac: Enable alternative 128-bit long double format on
	powerpc64*-*-linux*.
	* doc/Makefile.in: Regenerate.
	* fragment.am: Regenerate.
	* include/Makefile.am: Set _GLIBCXX_LONG_DOUBLE_ALT128_COMPAT.
	* include/Makefile.in: Regenerate.
	* include/bits/c++config: Define inline namespace for new long
	double symbols. Don't define _GLIBCXX_USE_FLOAT128 when it's the
	same type as long double.
	* include/bits/locale_classes.h [_GLIBCXX_LONG_DOUBLE_ALT128_COMPAT]
	(locale::_Impl::_M_init_extra_ldbl128): Declare new member function.
	* include/bits/locale_facets.h (_GLIBCXX_NUM_FACETS): Simplify by
	only counting narrow character facets.
	(_GLIBCXX_NUM_CXX11_FACETS): Likewise.
	(_GLIBCXX_NUM_LBDL_ALT128_FACETS): New.
	[_GLIBCXX_LONG_DOUBLE_ALT128_COMPAT] (num_get::__do_get): Define
	vtable placeholder for __ibm128 long double type.
	[_GLIBCXX_LONG_DOUBLE_ALT128_COMPAT && __LONG_DOUBLE_IEEE128__]
	(num_get::__do_get): Declare vtable placeholder for __ibm128 long
	double type.
	[_GLIBCXX_LONG_DOUBLE_ALT128_COMPAT && __LONG_DOUBLE_IEEE128__]
	(num_put::__do_put): Likewise.
	* include/bits/locale_facets.tcc
	[_GLIBCXX_LONG_DOUBLE_ALT128_COMPAT && __LONG_DOUBLE_IEEE128__]
	(num_get::__do_get, num_put::__do_put): Define.
	* include/bits/locale_facets_nonio.h
	[_GLIBCXX_LONG_DOUBLE_ALT128_COMPAT && __LONG_DOUBLE_IEEE128__]
	(money_get::__do_get): Declare vtable placeholder for __ibm128 long
	double type.
	[_GLIBCXX_LONG_DOUBLE_ALT128_COMPAT && __LONG_DOUBLE_IEEE128__]
	(money_put::__do_put): Likewise.
	* include/bits/locale_facets_nonio.tcc
	[_GLIBCXX_LONG_DOUBLE_ALT128_COMPAT && __LONG_DOUBLE_IEEE128__]
	(money_get::__do_get, money_put::__do_put): Define.
	* include/ext/numeric_traits.h [_GLIBCXX_LONG_DOUBLE_ALT128_COMPAT]
	(__numeric_traits<__ibm128>, __numeric_traits<__ieee128>): Define.
	* libsupc++/Makefile.in: Regenerate.
	* po/Makefile.in: Regenerate.
	* python/Makefile.in: Regenerate.
	* src/Makefile.am: Add compatibility-ldbl-alt128.cc and
	compatibility-ldbl-alt128-cxx11.cc sources and recipes for objects.
	* src/Makefile.in: Regenerate.
	* src/c++11/Makefile.in: Regenerate.
	* src/c++11/compatibility-ldbl-alt128-cxx11.cc: New file defining
	symbols using the old 128-bit long double format, for the cxx11 ABI.
	* src/c++11/compatibility-ldbl-alt128.cc: Likewise, for the
	gcc4-compatible ABI.
	* src/c++11/compatibility-ldbl-facets-aliases.h: New header for long
	double compat aliases.
	* src/c++11/cow-locale_init.cc: Add comment.
	* src/c++11/cxx11-locale-inst.cc: Define C and C_is_char
	unconditionally.
	* src/c++11/cxx11-wlocale-inst.cc: Add sanity check. Include
	locale-inst.cc directly, not via cxx11-locale-inst.cc.
	* src/c++11/locale-inst-monetary.h: New header for monetary
	category instantiations.
	* src/c++11/locale-inst-numeric.h: New header for numeric category
	instantiations.
	* src/c++11/locale-inst.cc: Include new headers for monetary,
	numeric, and long double definitions.
	* src/c++11/wlocale-inst.cc: Remove long double compat aliases that
	are defined in new header now.
	* src/c++17/Makefile.am: Use -mabi=ibmlongdouble for
	floating_from_chars.cc.
	* src/c++17/Makefile.in: Regenerate.
	* src/c++17/floating_from_chars.cc (from_chars_impl): Add
	if-constexpr branch for __ieee128.
	(from_chars): Overload for __ieee128.
	* src/c++20/Makefile.in: Regenerate.
	* src/c++98/Makefile.in: Regenerate.
	* src/c++98/locale_init.cc (num_facets): Adjust calculation.
	(locale::_Impl::_Impl(size_t)): Call _M_init_extra_ldbl128.
	* src/c++98/localename.cc (num_facets): Adjust calculation.
	(locale::_Impl::_Impl(const char*, size_t)): Call
	_M_init_extra_ldbl128.
	* src/filesystem/Makefile.in: Regenerate.
	* testsuite/Makefile.in: Regenerate.
	* testsuite/util/testsuite_abi.cc: Add new symbol versions.
	Allow new symbols to be added to GLIBCXX_IEEE128_3.4.29 and
	CXXABI_IEEE128_1.3.13 too.
	* testsuite/26_numerics/complex/abi_tag.cc: Add u9__ieee128 to
	regex matching expected symbols.
2020-12-16 23:25:01 +00:00
Gerald Pfeifer
23900be4d3 libstdc++: Update link to Unicode-HOWTO
libstdc++-v3/ChangeLog:

2020-12-15  Gerald Pfeifer  <gerald@pfeifer.com>

	* doc/xml/manual/codecvt.xml: Update link to Unicode-HOWTO.
	* doc/html/manual/facets.html: Regenerate.
2020-12-15 09:33:18 +01:00
Jonathan Wakely
edbbf7363c libstdc++: Adjust whitespace in documentation
libstdc++-v3/ChangeLog:

	* doc/xml/manual/appendix_contributing.xml: Use consistent
	indentation.
	* doc/html/manual/source_code_style.html: Regenerate.
2020-12-08 13:36:45 +00:00
Jonathan Wakely
44ac1ea0e2 libstdc++: Update C++20 library implementation status
libstdc++-v3/ChangeLog:

	* doc/xml/manual/status_cxx2020.xml: Update C++20 status.
	* doc/html/*: Regenerate.
2020-12-03 19:17:13 +00:00
JeanHeyd Meneide
57d76ee9cf libtdc++: Define std::source_location for C++20
This doesn't define a new _GLIBCXX_HAVE_BUILTIN_SOURCE_LOCATION macro.
because using __has_builtin(__builtin_source_location) is sufficient.
Currently only GCC supports it, but if/when Clang and Intel add it the
__has_builtin check should for them too.

Co-authored-by: Jonathan Wakely <jwakely@redhat.com>

libstdc++-v3/ChangeLog:

	* doc/doxygen/user.cfg.in (INPUT): Add <source_location>.
	* include/Makefile.am: Add <source_location>.
	* include/Makefile.in: Regenerate.
	* include/std/version (__cpp_lib_source_location): Define.
	* include/std/source_location: New file.
	* testsuite/18_support/source_location/1.cc: New test.
	* testsuite/18_support/source_location/consteval.cc: New test.
	* testsuite/18_support/source_location/srcloc.h: New test.
	* testsuite/18_support/source_location/version.cc: New test.
2020-12-03 19:17:13 +00:00
Jonathan Wakely
82ac923da6 libstdc++: Add new C++20 headers to Doxygen settings
This doesn't actually have any effect unless you also change the
predefined value of __cplusplus, as it's currently 201703L. But if
somebody does want to do that, the new headers will get processed now.

libstdc++-v3/ChangeLog:

	* doc/doxygen/user.cfg.in (INPUT): Add <latch> and <semaphore>.
2020-11-30 15:02:03 +00:00
Rainer Orth
55ebb0d6fb ada: c++: Get rid of libposix4, librt on Solaris
I recently noticed that neither libposix4 nor librt are needed on
Solaris 11 any longer:

* libposix4 was renamed to librt in Solaris 7 back in 1998.

* librt was folded into libc in the OpenSolaris timeframe, leaving librt
  only as a filter on libc.  Thus, it's no longer needed on either
  Solaris 11 or Illumos.

The following patch removes both uses.  At the same time, Ada's use of
libthread has gone: it was folded into libc in Solaris 10 already.
TIME_LIBRARY and friends in g++ are likewise removed: Solaris was the
only user.

Bootstrapped without regressions on i386-pc-solaris2.11,
sparc-sun-solaris2.11, and x86_64-pc-linux-gnu.


2020-11-16  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	gcc/cp:
	* g++spec.c (TIMELIB, TIME_LIBRARY): Remove.
	(lang_specific_driver): Remove TIME_LIBRARY handling.

	gcc:
	* config/sol2.h (TIME_LIBRARY): Remove.

	libstdc++-v3:
	* acinclude.m4 (GLIBCXX_ENABLE_LIBSTDCXX_TIME): Remove libposix4
	references.
	<solaris*>: Don't use -lrt any longer.
	* configure: Regenerate.

	* doc/xml/manual/configure.xml (--enable-libstdcxx-time=OPTION):
	Remove libposix4 reference.

	gcc/ada:
	* Makefile.rtl <sparc*-sun-solaris*> (THREADSLIB): Remove.
	(MISCLIB): Remove -lposix4.
	<*86-*-solaris2*>: Likewise.
	* libgnarl/s-osinte__solaris.ads (System.OS_Interface): Remove
	-lposix4 -lthread.
2020-11-26 13:01:30 +01:00
Jonathan Wakely
3ef33e756a libstdc++: Document istreambuf_iterator base class change [PR 92285]
libstdc++-v3/ChangeLog:

	PR libstdc++/92285
	* doc/xml/manual/evolution.xml: Document change to base class.
	* doc/html/manual/api.html: Regenerate.
2020-11-04 12:46:52 +00:00
Thomas Rodgers
6bcbcea058 libstdc++: Add c++2a <syncstream>
libstdc++-v3/ChangeLog:
	* doc/doxygen/user.cfg.in (INPUT): Add new header.
	* include/Makefile.am (std_headers): Add new header.
	* include/Makefile.in: Regenerate.
	* include/precompiled/stdc++.h: Include new header.
	* include/std/syncstream: New header.
	* include/std/version: Add __cpp_lib_syncbuf.
	* testsuite/27_io/basic_syncbuf/1.cc: New test.
	* testsuite/27_io/basic_syncbuf/2.cc: Likewise.
	* testsuite/27_io/basic_syncbuf/basic_ops/1.cc:
	Likewise.
	* testsuite/27_io/basic_syncbuf/requirements/types.cc:
	Likewise.
	* testsuite/27_io/basic_syncbuf/sync_ops/1.cc:
	Likewise.
	* testsuite/27_io/basic_syncstream/1.cc: Likewise.
	* testsuite/27_io/basic_syncstream/2.cc: Likewise.
	* testsuite/27_io/basic_syncstream/basic_ops/1.cc:
	Likewise.
	* testsuite/27_io/basic_syncstream/requirements/types.cc:
	Likewise.
2020-11-02 10:41:32 -08:00
Jonathan Wakely
0e0beddd7f libstdc++: Update C++20 status documentation
libstdc++-v3/ChangeLog:

	* doc/xml/manual/evolution.xml: Document some API changes
	and deprecations.
	* doc/xml/manual/intro.xml: Document LWG 2499.
	* doc/xml/manual/status_cxx2020.xml: Update status.
	* doc/html/*: Regenerate.
2020-10-13 17:40:43 +01:00
Jonathan Wakely
16d0b033ca libstdc++: Remove trailing whitespace from XML docs
libstdc++-v3/ChangeLog:

	* doc/xml/book.txml: Remove trailing whitespace.
	* doc/xml/chapter.txml: Likewise.
	* doc/xml/class.txml: Likewise.
	* doc/xml/gnu/fdl-1.3.xml: Likewise.
	* doc/xml/gnu/gpl-3.0.xml: Likewise.
	* doc/xml/manual/abi.xml: Likewise.
	* doc/xml/manual/algorithms.xml: Likewise.
	* doc/xml/manual/allocator.xml: Likewise.
	* doc/xml/manual/appendix_contributing.xml: Likewise.
	* doc/xml/manual/appendix_free.xml: Likewise.
	* doc/xml/manual/appendix_porting.xml: Likewise.
	* doc/xml/manual/atomics.xml: Likewise.
	* doc/xml/manual/auto_ptr.xml: Likewise.
	* doc/xml/manual/backwards_compatibility.xml: Likewise.
	* doc/xml/manual/bitmap_allocator.xml: Likewise.
	* doc/xml/manual/build_hacking.xml: Likewise.
	* doc/xml/manual/codecvt.xml: Likewise.
	* doc/xml/manual/concurrency.xml: Likewise.
	* doc/xml/manual/concurrency_extensions.xml: Likewise.
	* doc/xml/manual/configure.xml: Likewise.
	* doc/xml/manual/containers.xml: Likewise.
	* doc/xml/manual/ctype.xml: Likewise.
	* doc/xml/manual/debug.xml: Likewise.
	* doc/xml/manual/debug_mode.xml: Likewise.
	* doc/xml/manual/diagnostics.xml: Likewise.
	* doc/xml/manual/documentation_hacking.xml: Likewise.
	* doc/xml/manual/evolution.xml: Likewise.
	* doc/xml/manual/internals.xml: Likewise.
	* doc/xml/manual/intro.xml: Likewise.
	* doc/xml/manual/io.xml: Likewise.
	* doc/xml/manual/iterators.xml: Likewise.
	* doc/xml/manual/locale.xml: Likewise.
	* doc/xml/manual/localization.xml: Likewise.
	* doc/xml/manual/messages.xml: Likewise.
	* doc/xml/manual/mt_allocator.xml: Likewise.
	* doc/xml/manual/numerics.xml: Likewise.
	* doc/xml/manual/parallel_mode.xml: Likewise.
	* doc/xml/manual/policy_data_structures.xml: Likewise.
	* doc/xml/manual/prerequisites.xml: Likewise.
	* doc/xml/manual/shared_ptr.xml: Likewise.
	* doc/xml/manual/spine.xml: Likewise.
	* doc/xml/manual/status_cxxtr1.xml: Likewise.
	* doc/xml/manual/status_cxxtr24733.xml: Likewise.
	* doc/xml/manual/strings.xml: Likewise.
	* doc/xml/manual/support.xml: Likewise.
	* doc/xml/manual/test.xml: Likewise.
	* doc/xml/manual/test_policy_data_structures.xml: Likewise.
	* doc/xml/manual/using.xml: Likewise.
	* doc/xml/manual/using_exceptions.xml: Likewise.
	* doc/xml/manual/utilities.xml: Likewise.
	* doc/html/*: Regenerate.
2020-10-13 16:50:41 +01:00
Jonathan Wakely
c840700852 libstdc++: Update doxyfile to Doxygen 1.8.20 format
libstdc++-v3/ChangeLog:

	* doc/doxygen/user.cfg.in: Update to Doxygen 1.8.20 format.
2020-10-12 18:14:01 +01:00
Jonathan Wakely
925eb6a0fb libstdc++: Include C++17 features in doxygen API docs
libstdc++-v3/ChangeLog:

	* doc/doxygen/user.cfg.in (PREDEFINED): Use __cplusplus=201703L
	so that C++17 features are documented.
2020-10-12 18:14:01 +01:00
Jonathan Wakely
2137aa9241 libstdc++: Replace use of reserved name that clashes [PR 97362]
The name __deref is defined as a macro by Windows headers.

This renames the __deref() helper function to __ref. It doesn't actually
dereference an iterator. it just has the same type as the iterator's
reference type.

libstdc++-v3/ChangeLog:

	PR libstdc++/97362
	* doc/html/manual/source_code_style.html: Regenerate.
	* doc/xml/manual/appendix_contributing.xml: Add __deref to
	BADNAMES.
	* include/debug/functions.h (_Irreflexive_checker::__deref):
	Rename to __ref.
	* testsuite/17_intro/badnames.cc: Check __deref.
2020-10-10 21:22:12 +01:00
Jonathan Wakely
61f7995398 libstdc++: Fix misnamed configure option in manual
libstdc++-v3/ChangeLog:

	* doc/xml/manual/configure.xml: Correct name of option.
	* doc/html/*: Regenerate.
2020-09-24 17:35:02 +01:00
Andrew Luo
140cf935cd libstdc++: Implement P0966 std::string::reserve should not shrink
Remove ability for reserve(n) to reduce a string's capacity. Add a new
reserve() overload that makes a shrink-to-fit request, and make
shrink_to_fit() use that.

libstdc++-v3/ChangeLog:

2020-07-30  Andrew Luo  <andrewluotechnologies@outlook.com>
	    Jonathan Wakely  <jwakely@redhat.com>

	* config/abi/pre/gnu.ver (GLIBCXX_3.4): Use less greedy
	patterns for basic_string members.
	(GLIBCXX_3.4.29): Export new basic_string::reserve symbols.
	* doc/xml/manual/status_cxx2020.xml: Update P0966 status.
	* include/bits/basic_string.h (shrink_to_fit()): Call reserve().
	(reserve(size_type)): Remove default argument.
	(reserve()): Declare new overload.
	[!_GLIBCXX_USE_CXX11_ABI] (shrink_to_fit, reserve): Likewise.
	* include/bits/basic_string.tcc (reserve(size_type)): Remove
	support for shrinking capacity.
	(reserve()): Perform shrink-to-fit operation.
	[!_GLIBCXX_USE_CXX11_ABI] (reserve): Likewise.
	* testsuite/21_strings/basic_string/capacity/1.cc: Adjust to
	reflect new behavior.
	* testsuite/21_strings/basic_string/capacity/char/1.cc:
	Likewise.
	* testsuite/21_strings/basic_string/capacity/char/18654.cc:
	Likewise.
	* testsuite/21_strings/basic_string/capacity/char/2.cc:
	Likewise.
	* testsuite/21_strings/basic_string/capacity/wchar_t/1.cc:
	Likewise.
	* testsuite/21_strings/basic_string/capacity/wchar_t/18654.cc:
	Likewise.
	* testsuite/21_strings/basic_string/capacity/wchar_t/2.cc:
	Likewise.
2020-08-06 19:49:07 +01:00
Jonathan Wakely
54485adc77 libstdc++: Change URL for PSTL again
libstdc++-v3/ChangeLog:

	* doc/xml/manual/status_cxx2017.xml: Replace oneAPI DPC++ link
	with LLVM repo for PSTL.
	* doc/html/manual/status.html: Regenerate.
2020-08-05 22:46:32 +01:00
Gerald Pfeifer
8dc5f8529b Move www.stroustrup.com to https
libstdc++-v3/ChangeLog:

2020-08-02  Gerald Pfeifer  <gerald@pfeifer.com>

	* doc/xml/manual/using_exceptions.xml: Move www.stroustrup.com to
	https.
	* doc/html/manual/using_exceptions.html: Regenerate.
2020-08-02 00:26:36 +02:00
Gerald Pfeifer
d1da25fe99 libstdc++: ParallelSTL is now part of oneAPI DPC++ Library
libstdc++-v3:
2020-07-31  Gerald Pfeifer  <gerald@pfeifer.com>

	* doc/xml/manual/status_cxx2017.xml: ParallelSTL is now part
	of oneAPI DPC++ Library on Github.
	* doc/html/manual/status.html: Regenerate.
2020-07-31 23:19:37 +02:00
Jonathan Wakely
a2c5150e40 libstdc++: Regenerate makefiles
libstdc++-v3/ChangeLog:

	* doc/Makefile.in: Regenerate.
	* include/Makefile.in: Regenerate.
	* libsupc++/Makefile.in: Regenerate.
	* po/Makefile.in: Regenerate.
	* python/Makefile.in: Regenerate.
	* src/Makefile.in: Regenerate.
	* src/c++11/Makefile.in: Regenerate.
	* src/c++17/Makefile.in: Regenerate.
	* src/c++98/Makefile.in: Regenerate.
	* src/filesystem/Makefile.in: Regenerate.
	* testsuite/Makefile.in: Regenerate.
2020-06-23 07:59:40 +01:00
Jonathan Wakely
258059d91b libstdc++: Document API changes in GCC 10
* doc/xml/manual/evolution.xml: Document deprecation of
	__is_nullptr_t and removal of std::allocator members.
	* doc/html/manual/api.html: Regenerate.
2020-06-01 16:50:53 +01:00
Jonathan Wakely
a1ffe9b6f4 libstdc++: Fix incorrect Docbook links
The <xref> element creates the link text automatically from the link
target, rather than using the text node child of the element. This can
be changed by using an endterm attribute, but it's simpler to just use
the <link> element instead.

	* doc/xml/manual/containers.xml: Replace <xref> with <link>.
	* doc/xml/manual/evolution.xml: Likewise.
	* doc/html/manual/api.html: Regenerate.
	* doc/html/manual/containers.html: Regenerate.
2020-06-01 16:49:31 +01:00
Gerald Pfeifer
e41b988cc5 libstdc++: Update/streamline Valgrind references
* doc/xml/faq.xml: Adjust Valgrind reference and remove another.
	* doc/html/faq.html: Regenerate.
2020-06-01 17:04:22 +02:00
Gerald Pfeifer
0feb332152 libstdc++: Remove stray change from previous commit
There is a stray change (introducing a bogus line at the top) that
came via 2babbb6760c43bcd803a5e168ef5ecb0be8a5121; remove that again.

	* doc/xml/manual/policy_data_structures_biblio.xml: Remove
	stray change.
2020-06-01 02:10:24 +02:00
Gerald Pfeifer
2babbb6760 libstdc++: Switch www.cs.princeton.edu to https
* doc/xml/manual/policy_data_structures_biblio.xml: Switch
	www.cs.princeton.edu to https.
	* doc/html/manual/policy_data_structures.html: Regenerate.
2020-06-01 02:03:48 +02:00
Jonathan Wakely
2b6f6aeea1 libstdc++: Document library versioning for 9.[123] and 10.1
* doc/xml/manual/abi.xml (abi.versioning.history): Document library
	versions for GCC 9.[123] and 10.1 releases.
	* doc/html/*: Regenerate.
2020-05-06 10:30:15 +01:00
Jonathan Wakely
ae8a08ff59 libstdc++: Fix broken link to SGI STL FAQ
The previous URL to an entry in the wayback machine now redirects to a
page saying "SGI.com Tech Archive Resources now retired" so use an older
entry from the archive.

	* doc/xml/faq.xml: Use working link for SGI STL FAQ.
	* doc/html/*: Regenerate.
2020-05-04 22:54:25 +01:00
Jonathan Wakely
be0363c80f libstdc++: Update C++20 library status docs
This reorganises the C++20 status table, grouping the proposals by
category. It also adds more proposals, and documents all the feature
test macros for C++20 library changes.

	* doc/xml/manual/status_cxx2020.xml: Update C++20 status table.
	* doc/html/*: Regenerate.
2020-04-23 21:39:33 +01:00
Jonathan Wakely
57ede05c6a libstdc++: Improve C++14 and C++17 status docs
This adds a full table of contents for the C++14 and C++17 standards,
with status for each part.

For C++14 the list of proposals is removed, as it adds little value now
that everything is supported. For C++17 the table of proposals is
retained, because it documents he feature test macros for the features.

	* doc/Makefile.am (xml_sources_manual): Add missing XML files.
	* doc/Makefile.in: Regenerate.
	* doc/xml/manual/status_cxx1998.xml: Refer to "this section" instead
	of "this page".
	* doc/xml/manual/status_cxx2011.xml: Formatting and other corrections
	to the C++11 status table.
	* doc/xml/manual/status_cxx2014.xml: Replace list of C++14 feature
	proposals with table matching contents of the C++14 standard.
	* doc/xml/manual/status_cxx2017.xml: Add table matching contents of
	the C++17 standard.
	* doc/html/*: Regenerate.
2020-04-21 22:18:51 +01:00
Gerald Pfeifer
2a1a0c8c0d libstdc++: Refer to Git documentation
* doc/xml/manual/appendix_contributing.xml: Refer to Git
	documentation instead of Subversion.  Switch to https.
	* doc/html/manual/appendix_contributing.html: Regenerate.
2020-04-05 23:56:53 +02:00
Gerald Pfeifer
6c557ba538 libstdc++: Move "free books" list from fsf.org to gnu.org
* doc/xml/manual/appendix_free.xml: Move "free books" list from
	fsf.org to gnu.org.
	* doc/html/manual/appendix_free.html: Regenerate.
2020-04-01 22:45:35 +02:00
Maciej W. Rozycki
e8e66971cd Add `--with-toolexeclibdir=' configuration option
Provide means, in the form of a `--with-toolexeclibdir=' configuration
option, to override the default installation directory for target
libraries, otherwise known as $toolexeclibdir.  This is so that it is
possible to get newly-built libraries, particularly the shared ones,
installed in a common place, so that they can be readily used by the
target system as their host libraries, possibly over NFS, without a need
to manually copy them over from the currently hardcoded location they
would otherwise be installed in.

In the presence of the `--enable-version-specific-runtime-libs' option
and for configurations building native GCC the option is ignored.

	config/
	* toolexeclibdir.m4: New file.

	gcc/
	* doc/install.texi (Cross-Compiler-Specific Options): Document
	`--with-toolexeclibdir' option.

	libada/
	* Makefile.in (configure_deps): Add `toolexeclibdir.m4'.
	* configure.ac: Handle `--with-toolexeclibdir='.
	* configure: Regenerate.

	libatomic/
	* configure.ac: Handle `--with-toolexeclibdir='.
	* Makefile.in: Regenerate.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.
	* testsuite/Makefile.in: Regenerate.

	libffi/
	* configure.ac: Handle `--with-toolexeclibdir='.
	* Makefile.in: Regenerate.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.
	* include/Makefile.in: Regenerate.
	* man/Makefile.in: Regenerate.
	* testsuite/Makefile.in: Regenerate.

	libgcc/
	* Makefile.in (configure_deps): Add `toolexeclibdir.m4'.
	* configure.ac: Handle `--with-toolexeclibdir='.
	* configure: Regenerate.

	libgfortran/
	* configure.ac: Handle `--with-toolexeclibdir='.
	* Makefile.in: Regenerate.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.

	libgomp/
	* configure.ac: Handle `--with-toolexeclibdir='.
	* Makefile.in: Regenerate.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.
	* testsuite/Makefile.in: Regenerate.

	libhsail-rt/
	* configure.ac: Handle `--with-toolexeclibdir='.
	* Makefile.in: Regenerate.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.

	libitm/
	* configure.ac: Handle `--with-toolexeclibdir='.
	* Makefile.in: Regenerate.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.
	* testsuite/Makefile.in: Regenerate.

	libobjc/
	* Makefile.in (aclocal_deps): Add `toolexeclibdir.m4'.
	* aclocal.m4: Include `toolexeclibdir.m4'.
	* configure.ac: Handle `--with-toolexeclibdir='.
	* configure: Regenerate.

	liboffloadmic/
	* plugin/configure.ac: Handle `--with-toolexeclibdir='.
	* plugin/Makefile.in: Regenerate.
	* plugin/aclocal.m4: Regenerate.
	* plugin/configure: Regenerate.
	* configure.ac: Handle `--with-toolexeclibdir='.
	* Makefile.in: Regenerate.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.

	libphobos/
	* m4/druntime.m4: Handle `--with-toolexeclibdir='.
	* m4/Makefile.in: Regenerate.
	* libdruntime/Makefile.in: Regenerate.
	* src/Makefile.in: Regenerate.
	* testsuite/Makefile.in: Regenerate.
	* Makefile.in: Regenerate.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.

	libquadmath/
	* configure.ac: Handle `--with-toolexeclibdir='.
	* Makefile.in: Regenerate.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.

	libsanitizer/
	* configure.ac: Handle `--with-toolexeclibdir='.
	* Makefile.in: Regenerate.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.
	* asan/Makefile.in: Regenerate.
	* interception/Makefile.in: Regenerate.
	* libbacktrace/Makefile.in: Regenerate.
	* lsan/Makefile.in: Regenerate.
	* sanitizer_common/Makefile.in: Regenerate.
	* tsan/Makefile.in: Regenerate.
	* ubsan/Makefile.in: Regenerate.

	libssp/
	* configure.ac: Handle `--with-toolexeclibdir='.
	* Makefile.in: Regenerate.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.

	libstdc++-v3/
	* acinclude.m4: Handle `--with-toolexeclibdir='.
	* Makefile.in: Regenerate.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.
	* doc/Makefile.in: Regenerate.
	* include/Makefile.in: Regenerate.
	* libsupc++/Makefile.in: Regenerate.
	* po/Makefile.in: Regenerate.
	* python/Makefile.in: Regenerate.
	* src/Makefile.in: Regenerate.
	* src/c++11/Makefile.in: Regenerate.
	* src/c++17/Makefile.in: Regenerate.
	* src/c++98/Makefile.in: Regenerate.
	* src/filesystem/Makefile.in: Regenerate.
	* testsuite/Makefile.in: Regenerate.

	libvtv/
	* configure.ac: Handle `--with-toolexeclibdir='.
	* Makefile.in: Regenerate.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.
	* testsuite/Makefile.in: Regenerate.

	zlib/
	* configure.ac: Handle `--with-toolexeclibdir='.
	* Makefile.in: Regenerate.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.
2020-01-24 11:24:25 +00:00
Jonathan Wakely
c784f16204 libstdc++: Fix recent documentation changes
* doc/xml/faq.xml: Fix grammar.
	* doc/xml/manual/appendix_contributing.xml: Improve instructions.
	* doc/xml/manual/spine.xml: Update copyright years.
	* doc/html/*: Regenerate.
2020-01-20 21:45:52 +00:00
Eric S. Raymond
f4d83eba60 Clean up references to Subversion in documentation sources.
Clean up references to SVN in in the GCC docs, redirecting to Git
documentation as appropriate.

Where references to "the source code repository" rather than a
specific VCS make sense, I have used them. You might, after
all, change VCSes again someday.

I have not modified either generated HTML files nor maintainer scripts.
These changes should be complete with repect to the documentation tree.

2020-01-19  Eric S. Raymond <esr@thyrsus.com>

	gcc/
	* doc/contribute.texi: Update for SVN -> Git transition.
	* doc/install.texi: Likewise.

	libstdc++-v3
	* doc/xml/faq.xml: Update for SVN -> Git transition.
	* doc/xml/manual/appendix_contributing.xml: Likewise.
	* doc/xml/manual/status_cxx1998.xml: Likewise.
	* doc/xml/manual/status_cxx2011.xml: Likewise.
	* doc/xml/manual/status_cxx2014.xml: Likewise.
	* doc/xml/manual/status_cxx2017.xml: Likewise.
	* doc/xml/manual/status_cxx2020.xml: Likewise.
	* doc/xml/manual/status_cxxtr1.xml: Likewise.
	* doc/xml/manual/status_cxxtr24733.xml: Likewise.
2020-01-19 17:12:29 -08:00
Olivier Hainque
acd43917df rename local _C2 identifiers in stl map header files
2020-01-09  Olivier Hainque  <hainque@adacore.com>

	* doc/xml/manual/appendix_contributing.xml: Document _C2
	as a reserved identifier, by VxWorks.
	* include/bits/stl_map.h: Rename _C2 template typenames	as _Cmp2.
	* include/bits/stl_multimap.h: Likewise.

From-SVN: r280076
2020-01-09 23:00:50 +00:00
Jakub Jelinek
8d9254fc8a Update copyright years.
From-SVN: r279813
2020-01-01 12:51:42 +01:00
Janne Blomqvist
aeebd94c77 Switch gcc ftp URL's to https
The FTP protocol is getting long in the tooth, and we should emphasize
HTTPS where that is available. This patch changes various gcc.gnu.org
URL's to instead use HTTPS.

For instance, kernel.org shut down FTP access in 2017, with the
explanation:

- The protocol is inefficient and requires adding awkward kludges to
  firewalls and load-balancing daemons
- FTP servers have no support for caching or accelerators, which has
  significant performance impacts
- Most software implementations have stagnated and see infrequent
  updates

ChangeLog:

2019-11-20  Janne Blomqvist  <jb@gcc.gnu.org>

        * configure.ac: Use https for gcc.gnu.org.
        * configure: Regenerated.

gcc/ChangeLog:

2019-11-20  Janne Blomqvist  <jb@gcc.gnu.org>

        * configure.ac: Use https for gcc.gnu.org.
        * configure: Regenerated.
        * doc/install.texi: Use https for gcc.gnu.org.
        * doc/sourcebuild.texi: Likewise.

gcc/testsuite/ChangeLog:

2019-11-20  Janne Blomqvist  <jb@gcc.gnu.org>

        * README: Use https for gcc.gnu.org.

libstdc++-v3/ChangeLog:

2019-11-20  Janne Blomqvist  <jb@gcc.gnu.org>

        * doc/html/api.html: Use https for gcc.gnu.org.
        * doc/xml/api.xml: Likewise.

maintainer-scripts/ChangeLog:

2019-11-20  Janne Blomqvist  <jb@gcc.gnu.org>

        * gcc_release: Use https for gcc.gnu.org.

From-SVN: r278526
2019-11-20 22:24:48 +02:00
Jonathan Wakely
a0e1dcd44f libstdc++: Fix definition of std::nostopstate object
Also add <stop_token> header to PCH and Doxygen config.

	* doc/doxygen/user.cfg.in: Add <stop_token>.
	* include/precompiled/stdc++.h: Likewise.
	* include/std/stop_token: Fix definition of std::nostopstate.
	* testsuite/30_threads/headers/stop_token/synopsis.cc: New test.
	* testsuite/30_threads/headers/thread/types_std_c++20.cc: New test.
	* testsuite/30_threads/stop_token/stop_source.cc: New test.
	* testsuite/30_threads/stop_token/stop_token.cc: Remove unnecessary
	dg-require directives. Remove I/O and inclusion of <iostream>.

From-SVN: r278296
2019-11-15 14:38:59 +00:00
Gerald Pfeifer
cb6b5afe1d Update link to "Why not LGPL".
* doc/xml/gnu/gpl-3.0.xml: Adjust link to "Why not LGPL".

From-SVN: r278051
2019-11-11 13:35:33 +00:00
Gerald Pfeifer
7901a85f3c Switch www.hboehm.info to https
* doc/xml/manual/using.xml: Switch www.hboehm.info to https.

From-SVN: r278019
2019-11-10 13:37:26 +00:00
Jonathan Wakely
3d6e7aa95c libsupc++: add <compare> to precompiled header
Also process it with Doxygen.

	* doc/doxygen/user.cfg.in (INPUT): Add <compare> header.
	* include/precompiled/stdc++.h: Include <compare> header.

From-SVN: r277944
2019-11-08 00:37:17 +00:00
Jonathan Wakely
081f3c3c2f Regenerate libstdc++ HTML docs
* doc/html/*: Regenerate.

From-SVN: r277699
2019-10-31 23:03:26 +00:00
Jonathan Wakely
328b52d675 Partial implementation of C++20 of <ranges> header
* doc/doxygen/user.cfg.in: Add new header.
	* include/Makefile.am: Add new header.
	* include/Makefile.in: Regenerate.
	* include/precompiled/stdc++.h: Include new header.
	* include/std/ranges: New header.
	(ranges::sentinel_t, ranges::range_value_t, ranges::range_reference_t)
	(ranges::range_rvalue_reference_t, ranges::sized_range)
	(ranges::output_range, ranges::input_ranges, ranges::forward_range)
	(ranges::bidirectional_range, ranges::random_access_range)
	(ranges::contiguous_range, ranges::common::range): Define.
	* testsuite/24_iterators/headers/iterator/synopsis_c++20.cc: Check
	that disabled_sized_sentinel can be specialized.
	* testsuite/std/ranges/access/begin.cc: Include <ranges> instead of
	<iterator>.
	* testsuite/std/ranges/access/cbegin.cc: Likewise.
	* testsuite/std/ranges/access/cdata.cc: Likewise.
	* testsuite/std/ranges/access/cend.cc: Likewise.
	* testsuite/std/ranges/access/crbegin.cc: Likewise.
	* testsuite/std/ranges/access/crend.cc: Likewise.
	* testsuite/std/ranges/access/data.cc: Likewise.
	* testsuite/std/ranges/access/empty.cc: Likewise.
	* testsuite/std/ranges/access/end.cc: Likewise.
	* testsuite/std/ranges/access/end_neg.cc: Likewise.
	* testsuite/std/ranges/access/rbegin.cc: Likewise.
	* testsuite/std/ranges/access/rend.cc: Likewise.
	* testsuite/std/ranges/access/size.cc: Likewise.
	* testsuite/std/ranges/access/size_neg.cc: Likewise.
	* testsuite/std/ranges/headers/ranges/synopsis.cc: New test.
	* testsuite/std/ranges/range.cc: New test.
	* testsuite/std/ranges/refinements.cc: New test.
	* testsuite/std/ranges/sized.cc: New test.
	* testsuite/util/testsuite_iterators.h: Add aliases for range types.
	(output_iterator_wrapper::WritableObject::operator=): Add const
	qualifier so that output_iterator_wrapper satisfies writable.

From-SVN: r277697
2019-10-31 21:42:18 +00:00
Gerald Pfeifer
c61f8150f0 codecvt.xml: Switch pubs.opengroup.org to https.
* doc/xml/manual/codecvt.xml: Switch pubs.opengroup.org to https.
	* doc/xml/manual/locale.xml (LC_ALL): Ditto.
	* doc/xml/manual/messages.xml: Ditto.

From-SVN: r277476
2019-10-26 21:57:56 +00:00
Gerald Pfeifer
a0f9baa295 policy_data_structures_biblio.xml: Switch pubs.opengroup.org to https.
* doc/xml/manual/policy_data_structures_biblio.xml: Switch
	pubs.opengroup.org to https.

From-SVN: r277436
2019-10-25 05:37:34 +00:00
Gerald Pfeifer
19dc1c310f * doc/xml/gnu/gpl-3.0.xml: Switch www.gnu.org to https.
From-SVN: r277435
2019-10-25 05:19:50 +00:00
Edward Smith-Rowland
d57ebc3415 status_cxx2020.xml: Add rows and update status.
2019-09-09  Edward Smith-Rowland  <3dw4rd@verizon.net>

	* doc/xml/manual/status_cxx2020.xml: Add rows and update status.

From-SVN: r277434
2019-10-25 01:44:10 +00:00
Jonathan Wakely
02819d3919 PR libstdc++/88338 Implement P0898R3, C++20 concepts library
The implementation is already complete but this updates the docs and
adds tests for the feature test macro.

	* doc/xml/manual/status_cxx2020.xml: Update status.
	* doc/html/*: Regenerate.
	* testsuite/std/concepts/1.cc: New test.
	* testsuite/std/concepts/2.cc: New test.

From-SVN: r277371
2019-10-24 10:47:25 +01:00
Jonathan Wakely
1a45649501 Process new C++17 and C++20 headers with Doxygen
This won't do anything by default, because __cplusplus is set to 201402L
when Doxygen runs. If/when that changes, these headers should be
processed.

	* doc/doxygen/user.cfg.in (INPUT): Add new C++17 and C++20 headers.

From-SVN: r277121
2019-10-17 16:40:04 +01:00
Jonathan Wakely
07f37a7fd4 Add makefile target to update HTML files in source tree
Also remove the creation of the html/ext sub-directory, which has been
unused since revision r245258.

	* doc/Makefile.am (doc-html-docbook-regenerate): New target.
	(${docbook_outdir}/html): Do not create unused 'html/ext' directory.
	* doc/Makefile.in: Regenerate.
	* doc/xml/manual/documentation_hacking.xml: Document new target.
	* doc/html/*: Regenerate.

From-SVN: r276695
2019-10-08 12:01:44 +01:00
Jonathan Wakely
db4fd46519 Restore URL for Austern article on allocators
This reverts "Remove broken URL from libstdc++ manual" by restoring the
link, but using an archived copy from the Wayback Machine.

	* doc/xml/manual/allocator.xml: Use archived copy of CUJ article.
	* doc/html/*: Regenerate.

From-SVN: r276693
2019-10-08 11:41:28 +01:00
Jonathan Wakely
709310e7a4 Document non-conformance of parallel mode to recent C++ standards
* doc/xml/manual/parallel_mode.xml: Add caveat about support for
	recent standards.
	* doc/html/*: Regenerate.

From-SVN: r276463
2019-10-02 15:56:57 +01:00
Edward Smith-Rowland
324fb1020f Update docs for recent <span> and constexpr lib changes.
2019-09-09  Edward Smith-Rowland  <3dw4rd@verizon.net>

	Update docs for recent <span> and constexpr lib changes.
	* doc/xml/manual/status_cxx2020.xml: Update p0202r3, p0858r0, p0879r0,
	p1023r0, p1085r2 status.
	* doc/html/manual/status.html: Regenerate.

From-SVN: r275522
2019-09-09 16:54:31 +00:00
Jonathan Wakely
4ef5bbd815 Define std::ssize for C++20 (P1227R2)
* include/bits/range_access.h (ssize): Define for C++20.
	* testsuite/24_iterators/range_access_cpp20.cc: New test.
	* doc/xml/manual/status_cxx2020.xml: Update P1227R2 status.
	* doc/html/*: Regenerate.

From-SVN: r275458
2019-09-06 13:54:51 +01:00
Jonathan Wakely
b5c433ce11 Improve precondition checks for std::span
* doc/xml/manual/status_cxx2020.xml: Update status for P0122R7 and
	P1024R3. Remove entry for P0920R2.
	* include/std/span  (__cpp_lib_span): Change value.
	(__extent_storage, __extent_storage<dynamic_extent>): Remove default
	constructor.
	(span): Replace __extent_storage base class with data member.
	(span::_S_subspan_extent): New function.
	(span::empty()): Add nodiscard attribute.
	(span::front, span::back, span::operator[]): Check preconditions.
	(span::first, span::last, span::subspan): Add noexcept. Improve
	precondition checks (LWG 3103).
	(get): Remove redundant condition from static_assert.
	(tuple_element<I, span<T, E>>): Fix static_assert message and simplify.
	(as_writable_bytes): Add inline specifier.
	* include/std/version (__cpp_lib_span): Change value.
	* testsuite/23_containers/span/back_neg.cc: Remove stray semi-colon.
	* testsuite/23_containers/span/front_neg.cc: Likewise.
	* testsuite/23_containers/span/index_op_neg.cc: Likewise.
	* testsuite/23_containers/span/last_neg.cc: Improve test.
	* testsuite/23_containers/span/subspan_neg.cc: Likewise.
	* testsuite/23_containers/span/1.cc: New test.
	* testsuite/23_containers/span/2.cc: New test.
	* testsuite/23_containers/span/back_assert_neg.cc: New test.
	* testsuite/23_containers/span/first_2_assert_neg.cc: New test.
	* testsuite/23_containers/span/first_assert_neg.cc: New test.
	* testsuite/23_containers/span/first_neg.cc: New test.
	* testsuite/23_containers/span/front_assert_neg.cc: New test.
	* testsuite/23_containers/span/index_op_assert_neg.cc: New test.
	* testsuite/23_containers/span/last_2_assert_neg.cc: New test.
	* testsuite/23_containers/span/last_assert_neg.cc: New test.
	* testsuite/23_containers/span/subspan_2_assert_neg.cc: New test.
	* testsuite/23_containers/span/subspan_3_assert_neg.cc: New test.
	* testsuite/23_containers/span/subspan_4_assert_neg.cc: New test.
	* testsuite/23_containers/span/subspan_5_assert_neg.cc: New test.
	* testsuite/23_containers/span/subspan_6_assert_neg.cc: New test.
	* testsuite/23_containers/span/subspan_assert_neg.cc: New test.

From-SVN: r275411
2019-09-05 14:48:33 +01:00
Jonathan Wakely
efd9a01b59 Remove broken URL from libstdc++ manual
The URL for the "What Are Allocators Good For?" article has been a
recurring source of problems. It moved from the C/C++ Users Journal
website to the Dr Dobbs site after CUJ shut down, and the original
domain changed hands, leaving old links pointing to nefarious sites.

Now the URL to the copy on drdobbs.com no longer works either and I
can't find a (legal) copy of the article online. The simplest solution
is to remove the URL.

	* doc/xml/manual/allocator.xml: Remove URL for bibliography entry.
	* doc/html/*: Regenerate.

From-SVN: r275398
2019-09-05 08:46:00 +01:00
Ulrich Weigand
2f2aeda98f Remove Cell Broadband Engine SPU targets
From-SVN: r275343
2019-09-03 15:08:28 +00:00
Jonathan Wakely
30f43083ae Update libstdc++ docs for library version bumps
* doc/xml/manual/abi.xml: Document 9.x library versions.
	* doc/html/*: Regenerate.

From-SVN: r275314
2019-09-02 12:31:30 +01:00
Gerald Pfeifer
3e7254c5e4 policy_data_structures_biblio.xml (COM: Component Model Object Technologies): Adjust name and link.
* doc/xml/manual/policy_data_structures_biblio.xml (COM: Component
	Model Object Technologies): Adjust name and link.

From-SVN: r275268
2019-09-01 12:42:41 +00:00
Jonathan Wakely
9e3c41ab04 Do not try to process deleted headers with Doxygen
* doc/doxygen/user.cfg.in (INPUT): Remove profile mode headers.

From-SVN: r274758
2019-08-20 22:35:55 +01:00
Gerald Pfeifer
011fc8c66f documentation_hacking.xml: doxygen.org is now doxygen.nl.
* doc/xml/manual/documentation_hacking.xml: doxygen.org is now
	doxygen.nl.

From-SVN: r274094
2019-08-04 13:20:32 +00:00
Gerald Pfeifer
c5993c9abc documentation_hacking.xml: Fix broken reference to the Doxygen manual.
* doc/xml/manual/documentation_hacking.xml: Fix broken reference
	to the Doxygen manual. Avoid a "here" link on the way.
	Fix another broken link to Doxygen docblocks.

From-SVN: r273852
2019-07-28 09:10:32 +00:00
Jonathan Wakely
804e2d0631 Update C++2a library status table
* doc/xml/manual/status_cxx2020.xml: Update status for atomic_ref
	and floating point atomics.

From-SVN: r273441
2019-07-12 12:43:17 +01:00
Jonathan Wakely
f6822be73a Improve docs for --enable-libstdcxx-time=rt
* doc/xml/manual/configure.xml: Improve documentation of
	--enable-libstdcxx-time option.

From-SVN: r273421
2019-07-11 20:43:32 +01:00
Jonathan Wakely
9f35dcd405 Fix outdated reference to C++17 draft in the docs
* doc/xml/manual/status_cxx2017.xml: Fix outdated reference to
	C++17 working draft.

From-SVN: r272500
2019-06-20 10:13:03 +01:00
Jonathan Wakely
bf5824f928 Corrections for C++2a library status table
* doc/xml/manual/status_cxx2020.xml: Add missing row for P0920R2.
	Fix bgcolor for P0340R3.
	* doc/html/*: Regenerate.

From-SVN: r271868
2019-06-03 14:32:17 +01:00
Jonathan Wakely
512a80ec49 PR libstdc++/90686 update C++2a library status docs
PR libstdc++/90686
	* doc/xml/manual/status_cxx2014.xml: Document what's missing from
	<experimental/memory_resource>.
	* doc/xml/manual/status_cxx2020.xml: Document status of P1285R0,
	P0339R6, P0340R3, P1164R1 and P1357R1.
	* doc/html/*: Regenerate.

From-SVN: r271867
2019-06-03 14:23:03 +01:00
Jonathan Wakely
ebaf365963 Enforce allocator::value_type consistency for containers in C++2a
In previous standards it is undefined for a container and its allocator
to have a different value_type. Libstdc++ has traditionally allowed it
as an extension, automatically rebinding the allocator to the
container's value_type. Since GCC 8.1 that extension has been disabled
for C++11 and later when __STRICT_ANSI__ is defined (i.e. for
-std=c++11, -std=c++14, -std=c++17 and -std=c++2a).

Since the acceptance of P1463R1 into the C++2a draft an incorrect
allocator::value_type now requires a diagnostic. This patch implements
that by enabling the static_assert for -std=gnu++2a as well.

	* doc/xml/manual/status_cxx2020.xml: Document P1463R1 status.
	* include/bits/forward_list.h [__cplusplus > 201703]: Enable
	allocator::value_type assertion for C++2a.
	* include/bits/hashtable.h: Likewise.
	* include/bits/stl_deque.h: Likewise.
	* include/bits/stl_list.h: Likewise.
	* include/bits/stl_map.h: Likewise.
	* include/bits/stl_multimap.h: Likewise.
	* include/bits/stl_multiset.h: Likewise.
	* include/bits/stl_set.h: Likewise.
	* include/bits/stl_vector.h: Likewise.
	* testsuite/23_containers/deque/48101-3_neg.cc: New test.
	* testsuite/23_containers/forward_list/48101-3_neg.cc: New test.
	* testsuite/23_containers/list/48101-3_neg.cc: New test.
	* testsuite/23_containers/map/48101-3_neg.cc: New test.
	* testsuite/23_containers/multimap/48101-3_neg.cc: New test.
	* testsuite/23_containers/multiset/48101-3_neg.cc: New test.
	* testsuite/23_containers/set/48101-3_neg.cc: New test.
	* testsuite/23_containers/unordered_map/48101-3_neg.cc: New test.
	* testsuite/23_containers/unordered_multimap/48101-3_neg.cc: New test.
	* testsuite/23_containers/unordered_multiset/48101-3_neg.cc: New test.
	* testsuite/23_containers/unordered_set/48101-3_neg.cc: New test.
	* testsuite/23_containers/vector/48101-3_neg.cc: New test.

From-SVN: r271866
2019-06-03 14:22:59 +01:00
Gerald Pfeifer
d030d4c5a4 * doc/xml/manual/allocator.xml: Move hoard.org back to http.
From-SVN: r271827
2019-05-31 22:26:55 +00:00
Jonathan Wakely
01b3b9e39f Update libstdc++ documentation for Support and Diagnostics clauses
* doc/xml/manual/diagnostics.xml: Update list of headers that define
	exception classes.
	* doc/xml/manual/support.xml: Rewrite advice around NULL. Rewrite
	section about new/delete overloads. Improve section on verbose
	terminate handler.
	* doc/html/*: Regenerate.

From-SVN: r271782
2019-05-30 16:47:32 +01:00