Commit Graph

12718 Commits

Author SHA1 Message Date
GCC Administrator
9f7c2bad52 Daily bump. 2021-09-03 00:16:33 +00:00
Jonathan Wakely
89cf858571 libstdc++: Implement std::atomic<T*>::compare_exchange_weak
For some reason r170217 didn't add compare_exchange_weak to the
__atomic_base<T*> partial specialization, and so weak compare exchange
operations on pointers use compare_exchange_strong instead.

This adds __atomic_base<T*>::compare_exchange_weak and then uses it in
std::atomic<T*>::compare_exchange_weak.

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

libstdc++-v3/ChangeLog:

	* include/bits/atomic_base.h (__atomic_base<P*>::compare_exchange_weak):
	Add new functions.
	* include/std/atomic (atomic<T*>::compare_exchange_weak): Use
	it.
2021-09-02 18:22:33 +01:00
Jonathan Wakely
892400f1f2 libstdc++: Tweak whitespace in <atomic>
Signed-off-by: Jonathan Wakely <jwakely@redhat.com>

libstdc++-v3/ChangeLog:

	* include/std/atomic: Tweak whitespace.
2021-09-02 18:22:32 +01:00
Jonathan Wakely
dba1ab2122 libstdc++: Remove "no stronger" assertion in compare exchange [PR102177]
P0418R2 removed some preconditions from std::atomic::compare_exchange_*
but we still enforce them via __glibcxx_assert. This removes those
assertions.

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

libstdc++-v3/ChangeLog:

	PR c++/102177
	* include/bits/atomic_base.h (__is_valid_cmpexch_failure_order):
	New function to check if a memory order is valid for the failure
	case of compare exchange operations.
	(__atomic_base<I>::compare_exchange_weak): Simplify assertions
	by using __is_valid_cmpexch_failure_order.
	(__atomic_base<I>::compare_exchange_strong): Likewise.
	(__atomic_base<P*>::compare_exchange_weak): Likewise.
	(__atomic_base<P*>::compare_exchange_strong): Likewise.
	(__atomic_impl::compare_exchange_weak): Add assertion.
	(__atomic_impl::compare_exchange_strong): Likewise.
	* include/std/atomic (atomic::compare_exchange_weak): Likewise.
	(atomic::compare_exchange_strong): Likewise.
2021-09-02 18:21:23 +01:00
Jonathan Wakely
5b73abd1a5 libstdc++: Define std::invoke_r for C++23 (P2136R3)
We already supported this feature as std::__invoke<R>, for internal use.
This just adds a public version of it to <functional>.

Internal uses should continue to include <bits/invoke.h> and use
std::__invoke<R> so that they don't need to include all of <functional>.

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

libstdc++-v3/ChangeLog:

	* include/std/functional (invoke_r): Define.
	* include/std/version (__cpp_lib_invoke_r): Define.
	* testsuite/20_util/function_objects/invoke/version.cc: Check
	for __cpp_lib_invoke_r as well as __cpp_lib_invoke.
	* testsuite/20_util/function_objects/invoke/4.cc: New test.
2021-09-02 17:48:45 +01:00
GCC Administrator
6d51ee4321 Daily bump. 2021-09-01 00:16:58 +00:00
Jonathan Wakely
ef7becc9c8 libstdc++: Add valid range checks to std::span constructors [PR98421]
Signed-off-by: Jonathan Wakely <jwakely@redhat.com>

libstdc++-v3/ChangeLog:

	PR libstdc++/98421
	* include/std/span (span(Iter, size_type), span(Iter, Iter)):
	Add valid range checks.
	* testsuite/23_containers/span/cons_1_assert_neg.cc: New test.
	* testsuite/23_containers/span/cons_2_assert_neg.cc: New test.
2021-08-31 19:13:55 +01:00
Jonathan Wakely
1cacdef0d1 libstdc++: Fix broken autoconf check for O_NONBLOCK
Signed-off-by: Jonathan Wakely <jwakely@redhat.com>

libstdc++-v3/ChangeLog:

	* configure.ac: Fix checks for F_GETFL, F_SETFL and O_NONBLOCK.
	* configure: Regenerate.
2021-08-31 17:38:27 +01:00
Jonathan Wakely
f63e86f797 libstdc++: Remove redundant noexcept-specifier on definitions
These destructors are noexcept anyway. I removed the redundant noexcept
from the error_category destructor's declaration in r0-123475, but
didn't remove it from the defaulted definition in system_error.cc. That
causes warnings if the library is built with Clang.

This removes the redundant noexcept from ~error_category and
~system_error and adds tests to ensure they really are noexcept.

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

libstdc++-v3/ChangeLog:

	* src/c++11/system_error.cc (error_category::~error_category()):
	Remove noexcept-specifier.
	(system_error::~system_error()): Likewise.
	* testsuite/19_diagnostics/error_category/noexcept.cc: New test.
	* testsuite/19_diagnostics/system_error/noexcept.cc: New test.
2021-08-31 17:36:12 +01:00
Jonathan Wakely
763eb1f192 libstdc++: Add missing return for atomic timed wait [PR102074]
This adds a missing return statement to the non-futex wait-until
operation.

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

libstdc++-v3/ChangeLog:

	PR libstdc++/102074
	* include/bits/atomic_timed_wait.h (__timed_waiter_pool)
	[!_GLIBCXX_HAVE_PLATFORM_TIMED_WAIT]: Add missing return.
2021-08-31 17:36:12 +01:00
Jonathan Wakely
feec7ef667 libstdc++: Improve error handling in Net TS name resolution
Signed-off-by: Jonathan Wakely <jwakely@redhat.com>

libstdc++-v3/ChangeLog:

	* include/experimental/internet (__make_resolver_error_code):
	Handle EAI_SYSTEM errors.
	(basic_resolver_results): Use __make_resolver_error_code. Use
	Glibc NI_MAXHOST and NI_MAXSERV values for buffer sizes.
2021-08-31 17:36:11 +01:00
Jonathan Wakely
48b20d46f9 libstdc++: Fix ip::tcp::resolver test failure on Solaris
Solaris 11 does not have "http" in /etc/services, which causes this test
to fail. Try some other services until we find one that works.

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

libstdc++-v3/ChangeLog:

	* testsuite/experimental/net/internet/resolver/ops/lookup.cc:
	Try other service if "http" fails.
2021-08-31 17:36:11 +01:00
Jonathan Wakely
69b09c5599 libstdc++: Fix 17_intro/names.cc failures on Solaris
Signed-off-by: Jonathan Wakely <jwakely@redhat.com>

libstdc++-v3/ChangeLog:

	* testsuite/17_intro/names.cc: Undefine some more names used
	by Solaris system headers.
2021-08-31 14:17:53 +01:00
GCC Administrator
1e2f030b80 Daily bump. 2021-08-31 00:16:50 +00:00
Jason Merrill
8960a29b18 c++: limit instantiation with ill-formed class [PR96286]
I noticed that after the static_assert failures in lwg3466.cc, we got
various follow-on errors because we went ahead and tried to instantiate the
promise<T> member functions even after instantiating the class itself ran
into problems.  Interrupting instantiation of the class itself seems likely
to cause error-recovery problems, but preventing instantiation of member
functions seems strictly better for error-recovery.

This doesn't fix any of the specific testcases in PR96286, but addresses
part of that problem space.

	PR c++/96286

gcc/cp/ChangeLog:

	* cp-tree.h (struct lang_type): Add erroneous bit-field.
	(CLASSTYPE_ERRONEOUS): New.
	* pt.c (limit_bad_template_recursion): Check it.
	(instantiate_class_template_1): Set it.

libstdc++-v3/ChangeLog:

	* testsuite/30_threads/promise/requirements/lwg3466.cc:
	Remove dg-prune-outputs.

gcc/testsuite/ChangeLog:

	* g++.dg/template/access2.C: Split struct A.
2021-08-30 17:25:21 -04:00
GCC Administrator
a21e5de421 Daily bump. 2021-08-29 00:16:41 +00:00
Jonathan Wakely
754fca77e8 libstdc++: Fix std::allocator<void> for versioned namespace
Removing the allocator<void> specialization for the versioned namespace
breaks _Extptr_allocator<void> because the allocator<void>
specialization was still declared in <bits/memoryfwd.h>, making it an
incomplete type.  It wrong to remove that specialization anyway, because
it is still needed pre-C++20.

This removes the #if ! _GLIBCXX_INLINE_VERSION check, so that
allocator<void> is still explicitly specialized for the versioned
namespace, consistent with the normal unversioned namespace mode.

To make _Extptr_allocator<void> usable as a ProtoAllocator, this change
adds a default constructor and converting constructor. That is
consistent with std::allocator<void> since C++20 (and harmless to do for
earlier standards).

I'm also explicitly specializing allocator_traits<allocator<void>> so
that it doesn't need to use allocator<void>::construct and destroy.
Doing that allows those members to be removed, further simplifying
allocator<void>.  That new explicit specialization can delete the
allocate, deallocate and max_size members, which are always ill-formed
for allocator<void>.

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

libstdc++-v3/ChangeLog:

	* include/bits/alloc_traits.h (allocator_traits): Add explicit
	specialization for allocator<void>. Improve doxygen comments.
	* include/bits/allocator.h (allocator<void>): Restore for the
	versioned namespace.
	(allocator<void>::construct, allocator<void>::destroy): Remove.
	* include/ext/extptr_allocator.h (_Extptr_allocator<void>):
	Add default constructor and converting constructor.
2021-08-28 14:37:19 +01:00
Jonathan Wakely
dd3e5859fc libstdc++: Fix comment typo
Signed-off-by: Jonathan Wakely <jwakely@redhat.com>

libstdc++-v3/ChangeLog:

	* include/bits/stl_uninitialized.h: Fix typo in comment.
2021-08-28 11:52:22 +01:00
Jonathan Wakely
07b990ee23 libstdc++: Fix inefficiency in filesystem::absolute [PR99876]
When the path is already absolute, the call to current_path() is
wasteful, because operator/ will ignore the left operand anyway.

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

libstdc++-v3/ChangeLog:

	PR libstdc++/99876
	* src/c++17/fs_ops.cc (fs::absolute): Call non-throwing form,
	to avoid unnecessary current_path() call.
2021-08-28 11:52:22 +01:00
Jonathan Wakely
952095bb05 libstdc++: Name std::function template parameter
This avoids "<template-parameter-2-2>" being shown in the diagnostics
for ill-formed uses of std::function constructor:

In instantiation of 'std::function<_Res(_ArgTypes ...)>::function(_Functor&&)
[with _Functor = f(f()::_Z1fv.frame*)::<lambda()>;
<template-parameter-2-2> = void; _Res = void; _ArgTypes = {}]'

Instead we get:

In instantiation of 'std::function<_Res(_ArgTypes ...)>::function(_Functor&&)
[with _Functor = f(f()::_Z1fv.frame*)::<lambda()>;
_Constraints = void; _Res = void; _ArgTypes = {}]'

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

libstdc++-v3/ChangeLog:

	* include/bits/std_function.h (function::function(F&&)): Give
	name to defaulted template parameter, to improve diagnostics.
	Use markdown for more doxygen comments.
2021-08-28 11:52:22 +01:00
GCC Administrator
ccc1914543 Daily bump. 2021-08-27 00:16:22 +00:00
Jonathan Wakely
3a32a8ad7c libstdc:: Use markdown for Doxygen comments in std::function
Signed-off-by: Jonathan Wakely <jwakely@redhat.com>

libstdc++-v3/ChangeLog:

	* include/bits/std_function.h (function): Adjust doxygen
	comments.
	* include/bits/unique_ptr.h (make_unique_for_overwrite):
	Change parameter name to match doxygen comment.
2021-08-27 00:12:54 +01:00
Jonathan Wakely
d38d26be33 libstdc++: Avoid a move in std::function construction (LWG 2447)
This makes the std::function constructor use perfect forwarding, to
avoid an unnecessary move-construction of the target. This means we need
to rewrite the _Function_base::_Base_manager::_M_init_functor function
to use a forwarding reference, and so can reuse it for the clone
operation.

Also simplify the SFINAE constraints on the constructor, by combining
the !is_same_v<remove_cvref_t<F>, function> constraint into the
_Callable trait.

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

libstdc++-v3/ChangeLog:

	* include/bits/std_function.h (_function_base::_Base_manager):
	Replace _M_init_functor with a function template using a
	forwarding reference, and a pair of _M_create function
	templates. Reuse _M_create for the clone operation.
	(function::_Decay_t): New alias template.
	(function::_Callable): Simplify by using _Decay.
	(function::function(F)): Change parameter to forwarding
	reference, as per LWG 2447. Add noexcept-specifier. Simplify
	constraints.
	(function::operator=(F&&)): Add noexcept-specifier.
	* testsuite/20_util/function/cons/lwg2774.cc: New test.
	* testsuite/20_util/function/cons/noexcept.cc: New test.
2021-08-27 00:12:54 +01:00
Jonathan Wakely
8cf428bfd3 libstdc++: Add static assertions for std::function requirements
Add static assertions to std::function, so that more user-friendly
diagnostics are given when trying to store a non-copyable target object.

These preconditions were added as "Mandates:" by LWG 2447, but I'm
committing them separately from implementing that, to allow just this
change to be backported more easily.

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

libstdc++-v3/ChangeLog:

	* include/bits/std_function.h (function::function(F)): Add
	static assertions to check constructibility requirements.
2021-08-27 00:12:54 +01:00
Jonathan Wakely
cd67d138ec libstdc++: Make Networking TS headers more portable [PR100285]
Add more preprocessor conditions to check for constants being defined
before using them, so that the Networking TS headers can be compiled on
a wider range of platforms.

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

libstdc++-v3/ChangeLog:

	PR libstdc++/100285
	* configure.ac: Check for O_NONBLOCK.
	* configure: Regenerate.
	* include/experimental/internet: Include <ws2tcpip.h> for
	Windows.  Use preprocessor conditions around more constants.
	* include/experimental/socket: Use preprocessor conditions
	around more constants.
	* testsuite/experimental/net/internet/resolver/base.cc: Only use
	constants when the corresponding C macro is defined.
	* testsuite/experimental/net/socket/basic_socket.cc: Likewise.
	* testsuite/experimental/net/socket/socket_base.cc: Likewise.
	Make preprocessor checks more fine-grained.
2021-08-26 12:41:28 +01:00
GCC Administrator
85d77ac474 Daily bump. 2021-08-26 00:17:03 +00:00
Jonathan Wakely
ea5674687a libstdc++: Add another non-reserved name to tests
Signed-off-by: Jonathan Wakely <jwakely@redhat.com>

libstdc++-v3/ChangeLog:

	* testsuite/17_intro/names.cc: Check 'sz'.
2021-08-26 00:09:13 +01:00
Jonathan Wakely
f1a08f4d78 libstdc++: Fix names.cc test failures on Windows
The Windows CRT headers define structs with members called f, x, y etc
so don't check those. There are also lots of unnecessary function
parameters in mingw headers using non-reserved names, e.g.

<time.h> uses p and z as parameters of mingw_gettimeofday
<inttypes.h> uses j as a parameter of imaxabs
<pthread.h> uses l, o and func as parameter names

Those should be fixed in the headers instead.

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

libstdc++-v3/ChangeLog:

	* testsuite/17_intro/names.cc: Adjust for Windows.
2021-08-25 22:29:27 +01:00
Jonathan Wakely
0163bbaaef libstdc++: Fix non-reserved names in <valarray>
Signed-off-by: Jonathan Wakely <jwakely@redhat.com>

libstdc++-v3/ChangeLog:

	* include/std/valarray: Uglify 'func' parameters.
	* testsuite/17_intro/names.cc: Add 'func' to checks.
2021-08-25 22:29:26 +01:00
Jonathan Wakely
ead408529d libstdc++: Fix conditions for optimizing uninitialized algos [PR102064]
While laying some groundwork for constexpr std::vector, I noticed some
bugs in the std::uninitialized_xxx algorithms. The conditions being
checked for optimizing trivial cases were not quite right, as shown in
the examples in the PR.

This consolidates the checks into a single macro. The macro has
appropriate definitions for C++98 or for later standards, to avoid a #if
everywhere the checks are used. For C++11 and later the check makes a
call to a new function doing a static_assert to ensure we don't use
assignment in cases where construction would have been invalid.
Extracting that check to a separate function will be useful for
constexpr std::vector, as that can't use std::uninitialized_copy
directly because it isn't constexpr).

The consolidated checks mean that some slight variations in static
assert message are gone, as there is only one place that does the assert
now. That required adjusting some tests. As part of that the redundant
89164_c++17.cc test was merged into 89164.cc which is compiled as C++17
by default now, but can also use other -std options if the
C++17-specific error is made conditional with a target selector.

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

libstdc++-v3/ChangeLog:

	PR libstdc++/102064
	* include/bits/stl_uninitialized.h (_GLIBCXX_USE_ASSIGN_FOR_INIT):
	Define macro to check conditions for optimizing trivial cases.
	(__check_constructible): New function to do static assert.
	(uninitialized_copy, uninitialized_fill, uninitialized_fill_n):
	Use new macro.
	* testsuite/20_util/specialized_algorithms/uninitialized_copy/1.cc:
	Adjust dg-error pattern.
	* testsuite/23_containers/vector/cons/89164.cc: Likewise. Add
	C++17-specific checks from 89164_c++17.cc.
	* testsuite/23_containers/vector/cons/89164_c++17.cc: Removed.
	* testsuite/20_util/specialized_algorithms/uninitialized_copy/102064.cc:
	New test.
	* testsuite/20_util/specialized_algorithms/uninitialized_copy_n/102064.cc:
	New test.
	* testsuite/20_util/specialized_algorithms/uninitialized_fill/102064.cc:
	New test.
	* testsuite/20_util/specialized_algorithms/uninitialized_fill_n/102064.cc:
	New test.
2021-08-25 22:28:47 +01:00
Jonathan Wakely
2cd229dec8 libstdc++: Remove __gnu_cxx::rope::erase(size_type) [PR102048]
This function claims to remove a single character at index p, but it
actually removes p+1 characters beginning at p. So r.erase(0) removes
the first character, but r.erase(1) removes the second and third, and
r.erase(2) removes the second, third and fourth. This is not a useful
API.

The overload is present in the SGI STL <stl_rope.h> header that we
imported, but it isn't documented in the API reference. The erase
overloads that are documented are:

erase(const iterator& p)
erase(const iterator& f, const iterator& l)
erase(size_type i, size_type n);

Having an erase(size_type p) overload that erases a single character (as
the comment says it does) might be useful, but would be inconsistent
with std::basic_string::erase(size_type p = 0, size_type n = npos),
which erases from p to the end of the string when called with a single
argument.

Since the function isn't part of the documented API, doesn't do what it
claims to do (or anything useful) and "fixing" it would leave it
inconsistent with basic_string, I'm just removing that overload.

libstdc++-v3/ChangeLog:

	PR libstdc++/102048
	* include/ext/rope (rope::erase(size_type)): Remove broken
	function.
2021-08-25 22:28:46 +01:00
GCC Administrator
05ace2946b Daily bump. 2021-08-25 00:16:57 +00: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
037ef219b2 libstdc++: Add std::is_layout_compatible trait for C++20
Signed-off-by: Jonathan Wakely <jwakely@redhat.com>

libstdc++-v3/ChangeLog:

	* include/std/type_traits (is_layout_compatible): Define.
	(is_corresponding_member): Define.
	* include/std/version (__cpp_lib_is_layout_compatible): Define.
	* testsuite/20_util/is_layout_compatible/is_corresponding_member.cc:
	New test.
	* testsuite/20_util/is_layout_compatible/value.cc: New test.
	* testsuite/20_util/is_layout_compatible/version.cc: New test.
	* testsuite/20_util/is_pointer_interconvertible/with_class.cc:
	New test.
	* testsuite/23_containers/span/layout_compat.cc: Do not use real
	std::is_layout_compatible trait if available.
2021-08-24 16:12:44 +01:00
Jonathan Wakely
d8b7282ea2 libstdc++: Fix mismatched class-key tags
Clang warns about this, but GCC doesn't (see PR c++/102036).

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

libstdc++-v3/ChangeLog:

	* src/c++11/cxx11-shim_facets.cc: Fix mismatched class-key in
	explicit instantiation definitions.
2021-08-24 14:42:24 +01:00
GCC Administrator
38b19c5b08 Daily bump. 2021-08-24 00:17:00 +00:00
Jonathan Wakely
1a129376bb libstdc++: Add default template argument to basic_istream_view
The standard shows this default template argument in the <ranges>
synopsis, but it was missing in libstdc++.

libstdc++-v3/ChangeLog:

	* include/std/ranges (basic_istream_view): Add default template
	argument.
	* testsuite/std/ranges/istream_view.cc: Check it.
2021-08-23 16:17:10 +01:00
Jonathan Wakely
da6ce35106 libstdc++: Use __builtin_expect in __dynamic_cast
The null pointer check is never needed for correct code, only to
gracefully handle undefined cases. Add __builtin_expect to be sure that
we don't pessimize the valid uses.

libstdc++-v3/ChangeLog:

	* libsupc++/dyncast.cc (__dynamic_cast): Add __builtin_expect to
	precondition check.
2021-08-23 14:45:00 +01:00
Jonathan Wakely
bc97e736a5 libstdc++: Make permissions_are_testable function inline [PR90787]
This function should be inline, so that's it's not emitted in tests that
don't use it, to avoid undefined references to geteuid().

libstdc++-v3/ChangeLog:

	PR libstdc++/90787
	* testsuite/util/testsuite_fs.h (permissions_are_testable):
	Define as inline.
2021-08-23 14:44:48 +01:00
GCC Administrator
7c9e164583 Daily bump. 2021-08-21 00:16:29 +00:00
Jonathan Wakely
29b2fd371f libstdc++: Skip filesystem tests that depend on permissions [PR90787]
Tests that depend on filesystem permissions FAIL if run on Windows or as
root. Add a helper function to detect those cases, so the tests can skip
those checks gracefully.

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

libstdc++-v3/ChangeLog:

	PR libstdc++/90787
	* testsuite/27_io/filesystem/iterators/directory_iterator.cc:
	Use new __gnu_test::permissions_are_testable() function.
	* testsuite/27_io/filesystem/iterators/recursive_directory_iterator.cc:
	Likewise.
	* testsuite/27_io/filesystem/operations/exists.cc: Likewise.
	* testsuite/27_io/filesystem/operations/is_empty.cc: Likewise.
	* testsuite/27_io/filesystem/operations/remove.cc: Likewise.
	* testsuite/27_io/filesystem/operations/remove_all.cc: Likewise.
	* testsuite/27_io/filesystem/operations/status.cc: Likewise.
	* testsuite/27_io/filesystem/operations/symlink_status.cc:
	Likewise.
	* testsuite/27_io/filesystem/operations/temp_directory_path.cc:
	Likewise.
	* testsuite/experimental/filesystem/iterators/directory_iterator.cc:
	Likewise.
	* testsuite/experimental/filesystem/iterators/recursive_directory_iterator.cc:
	Likewise.
	* testsuite/experimental/filesystem/operations/exists.cc:
	Likewise.
	* testsuite/experimental/filesystem/operations/is_empty.cc:
	Likewise.
	* testsuite/experimental/filesystem/operations/remove.cc:
	Likewise.
	* testsuite/experimental/filesystem/operations/remove_all.cc:
	Likewise.
	* testsuite/experimental/filesystem/operations/temp_directory_path.cc:
	Likewise.
	* testsuite/util/testsuite_fs.h (__gnu_test::permissions_are_testable):
	New function to guess whether testing permissions will work.
2021-08-20 15:15:22 +01:00
GCC Administrator
b57fba5e37 Daily bump. 2021-08-20 00:16:28 +00: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
85a7095950 libstdc++: Don't check always-true condition [PR101965]
Signed-off-by: Jonathan Wakely <jwakely@redhat.com>

libstdc++-v3/ChangeLog:

	PR libstdc++/101965
	* include/std/charconv (__to_chars_i): Remove redundant check.
2021-08-19 14:57:41 +01:00
Jonathan Wakely
0187e0d736 libstdc++: Fix move construction of std::tuple with array elements [PR101960]
An array member cannot be direct-initialized in a ctor-initializer-list,
so use the base class' move constructor, which does the right thing for
both arrays and non-arrays.

This constructor could be defaulted, but that would make it trivial for
some specializations, which would change the argument passing ABI. Do
that for the versioned namespace only.

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

libstdc++-v3/ChangeLog:

	PR libstdc++/101960
	* include/std/tuple (_Tuple_impl(_Tuple_impl&&)): Use base
	class' move constructor. Define as defaulted for versioned
	namespace.
	* testsuite/20_util/tuple/cons/101960.cc: New test.
2021-08-19 13:02:12 +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
30b300de8e libstdc++: Improve doxygen docs for smart pointers
Signed-off-by: Jonathan Wakely <jwakely@redhat.com>

libstdc++-v3/ChangeLog:

	* include/bits/shared_ptr.h: Add @since and @headerfile tags.
	* include/bits/unique_ptr.h: Add @headerfile tags.
2021-08-19 13:02:12 +01:00
Jonathan Wakely
65441d8fc3 libstdc++: Improve overflow check for file timestamps
The current code assumes that system_clock::duration is nanoseconds, and
also performs a value-changing conversion from nanoseconds::max() to
double (which doesn't matter after dividing by 1e9, but triggers a
warning with Clang nonetheless).

A better solution is to use system_clock::duration::max() and perform
the comparison entirely using the std::chrono types, rather than with
dimensionless arithmetic types.

This doesn't address the FIXME in the function, so the overflow check
still rejects some values that could be represented by the file_clock.

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

libstdc++-v3/ChangeLog:

	* src/filesystem/ops-common.h (filesystem::file_time): Improve
	overflow check by using system_clock::duration::max().
2021-08-19 13:02:11 +01:00
Jonathan Wakely
c8a1cf1a7a libstdc++: Tweak whitespace
Signed-off-by: Jonathan Wakely <jwakely@redhat.com>

libstdc++-v3/ChangeLog:

	* include/bits/stl_tree.h: Tweak whitespace.
2021-08-19 13:02:11 +01:00