1 2020-02-01 Andrew Burgess <andrew.burgess@embecosm.com>
3 * configure: Regenerate.
5 2020-01-31 Patrick Palka <ppalka@redhat.com>
7 * testsuite/24_iterators/range_operations/distance.cc: Do not assume
8 test_range::end() returns the same type as test_range::begin().
9 * testsuite/24_iterators/range_operations/next.cc: Likewise.
10 * testsuite/24_iterators/range_operations/prev.cc: Likewise.
11 * testsuite/util/testsuite_iterators.h (__gnu_test::test_range::end):
12 Always return a sentinel<I>.
14 2020-01-29 Jonathan Wakely <jwakely@redhat.com>
17 * include/std/stop_token (stop_token::stop_possible()): Call new
18 _M_stop_possible() function.
19 (stop_token::stop_requested()): Do not use stop_possible().
20 (stop_token::binary_semaphore): New class, as temporary stand-in for
21 std::binary_semaphore.
22 (stop_token::_Stop_cb::_M_callback): Add noexcept to type.
23 (stop_token::_Stop_cb::_M_destroyed, stop_token::_Stop_cb::_M_done):
24 New data members for symchronization with stop_callback destruction.
25 (stop_token::_Stop_cb::_Stop_cb): Make non-template.
26 (stop_token::_Stop_cb::_M_linked, stop_token::_Stop_cb::_S_execute):
28 (stop_token::_Stop_cb::_M_run): New member function.
29 (stop_token::_Stop_state::_M_stopped, stop_token::_Stop_state::_M_mtx):
31 (stop_token::_Stop_state::_M_owners): New data member to track
32 reference count for ownership.
33 (stop_token::_Stop_state::_M_value): New data member combining a
34 spinlock, the stop requested flag, and the reference count for
35 associated stop_source objects.
36 (stop_token::_Stop_state::_M_requester): New data member for
37 synchronization with stop_callback destruction.
38 (stop_token::_Stop_state::_M_stop_possible()): New member function.
39 (stop_token::_Stop_state::_M_stop_requested()): Inspect relevant bit
41 (stop_token::_Stop_state::_M_add_owner)
42 (stop_token::_Stop_state::_M_release_ownership)
43 (stop_token::_Stop_state::_M_add_ssrc)
44 (stop_token::_Stop_state::_M_sub_ssrc): New member functions for
45 updating reference counts.
46 (stop_token::_Stop_state::_M_lock, stop_token::_Stop_state::_M_unlock)
47 (stop_token::_Stop_state::_M_lock, stop_token::_Stop_state::_M_unlock)
48 (stop_token::_Stop_state::_M_try_lock)
49 (stop_token::_Stop_state::_M_try_lock_and_stop)
50 (stop_token::_Stop_state::_M_do_try_lock): New member functions for
52 (stop_token::_Stop_state::_M_request_stop): Use atomic operations to
53 read and update state. Release lock while running callbacks. Use new
54 data members to synchronize with callback destruction.
55 (stop_token::_Stop_state::_M_remove_callback): Likewise.
56 (stop_token::_Stop_state::_M_register_callback): Use atomic operations
57 to read and update state.
58 (stop_token::_Stop_state_ref): Handle type to manage _Stop_state,
60 (stop_source::stop_source(const stop_source&)): Update reference count.
61 (stop_source::operator=(const stop_source&)): Likewise.
62 (stop_source::~stop_source()): Likewise.
63 (stop_source::stop_source(stop_source&&)): Define as defaulted.
64 (stop_source::operator=(stop_source&&)): Establish postcondition on
66 (stop_callback): Enforce preconditions on template parameter. Replace
67 base class with data member of new _Cb_impl type.
68 (stop_callback::stop_callback(const stop_token&, Cb&&))
69 (stop_callback::stop_callback(stop_token&&, Cb&&)): Fix TOCTTOU race.
70 (stop_callback::_Cb_impl): New type wrapping _Callback member and
71 defining the _S_execute member function.
72 * testsuite/30_threads/stop_token/stop_callback/deadlock-mt.cc: New
74 * testsuite/30_threads/stop_token/stop_callback/deadlock.cc: New test.
75 * testsuite/30_threads/stop_token/stop_callback/destroy.cc: New test.
76 * testsuite/30_threads/stop_token/stop_callback/destructible_neg.cc:
78 * testsuite/30_threads/stop_token/stop_callback/invocable_neg.cc: New
80 * testsuite/30_threads/stop_token/stop_callback/invoke.cc: New test.
81 * testsuite/30_threads/stop_token/stop_source/assign.cc: New test.
82 * testsuite/30_threads/stop_token/stop_token/stop_possible.cc: New
85 * libsupc++/compare (__detail::__3way_builtin_ptr_cmp): Use
86 three_way_comparable_with.
87 (__detail::__3way_cmp_with): Remove workaround for fixed bug.
88 (compare_three_way::operator()): Remove redundant constraint from
90 (__detail::_Synth3way::operator()): Use three_way_comparable_with
91 instead of workaround.
92 * testsuite/18_support/comparisons/object/93479.cc: Prune extra
93 output due to simplified constraints on compare_three_way::operator().
96 * libsupc++/compare (__3way_builtin_ptr_cmp): Require <=> to be valid.
97 * testsuite/18_support/comparisons/object/93479.cc: New test.
99 * testsuite/std/ranges/access/end.cc: Do not assume test_range::end()
100 returns the same type as test_range::begin(). Add comments.
101 * testsuite/std/ranges/access/rbegin.cc: Likewise.
102 * testsuite/std/ranges/access/rend.cc: Likewise.
103 * testsuite/std/ranges/range.cc: Do not assume the sentinel for
104 test_range is the same as its iterator type.
105 * testsuite/util/testsuite_iterators.h (test_range::sentinel): Add
106 operator- overloads to satisfy sized_sentinel_for when the iterator
107 satisfies random_access_iterator.
109 2020-01-28 Jonathan Wakely <jwakely@redhat.com>
112 * include/bits/refwrap.h (reference_wrapper::operator()): Restrict
113 static assertion to object types.
116 * acinclude.m4 (GLIBCXX_ENABLE_LIBSTDCXX_TIME): Use AC_SEARCH_LIBS for
117 clock_gettime instead of explicit glibc version check.
118 * configure: Regenerate.
120 2020-01-28 Martin Liska <mliska@suse.cz>
123 * include/std/atomic: Fix typo.
124 * include/std/optional: Likewise.
126 2020-01-27 Andrew Burgess <andrew.burgess@embecosm.com>
128 * configure: Regenerate.
130 2020-01-27 Jonathan Wakely <jwakely@redhat.com>
133 * include/std/span (span): Fix deduction guide.
134 * testsuite/23_containers/span/deduction.cc: New test.
136 2020-01-24 Jonathan Wakely <jwakely@redhat.com>
138 * libsupc++/compare (__cmp_cat::_Eq): Remove enumeration type.
139 (__cmp_cat::_Ord::equivalent): Add enumerator.
140 (__cmp_cat::_Ord::_Less, __cmp_cat::_Ord::_Greater): Rename to less
142 (partial_ordering, weak_ordering, strong_ordering): Remove
143 constructors taking __cmp_cat::_Eq parameters. Use renamed
146 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
148 * acinclude.m4: Handle `--with-toolexeclibdir='.
149 * Makefile.in: Regenerate.
150 * aclocal.m4: Regenerate.
151 * configure: Regenerate.
152 * doc/Makefile.in: Regenerate.
153 * include/Makefile.in: Regenerate.
154 * libsupc++/Makefile.in: Regenerate.
155 * po/Makefile.in: Regenerate.
156 * python/Makefile.in: Regenerate.
157 * src/Makefile.in: Regenerate.
158 * src/c++11/Makefile.in: Regenerate.
159 * src/c++17/Makefile.in: Regenerate.
160 * src/c++98/Makefile.in: Regenerate.
161 * src/filesystem/Makefile.in: Regenerate.
162 * testsuite/Makefile.in: Regenerate.
164 2020-01-23 Alexandre Oliva <oliva@adacore.com>
166 * crossconfig.m4 (GLIBCXX_CHECK_MATH_DECL): Reject macros.
167 * configure: Rebuild.
169 * testsuite/27_io/fpos/mbstate_t/1.cc: Zero-init mbstate_t.
171 2020-01-23 Jonathan Wakely <jwakely@redhat.com>
174 * include/Makefile.am (${host_builddir}/largefile-config.h): Simplify
176 * include/Makefile.in: Regenerate.
178 2020-01-20 Jonathan Wakely <jwakely@redhat.com>
180 * doc/xml/faq.xml: Fix grammar.
181 * doc/xml/manual/appendix_contributing.xml: Improve instructions.
182 * doc/xml/manual/spine.xml: Update copyright years.
183 * doc/html/*: Regenerate.
185 2020-01-19 Eric S. Raymond <esr@thyrsus.com>
187 * doc/xml/faq.xml: Update for SVN -> Git transition.
188 * doc/xml/manual/appendix_contributing.xml: Likewise.
189 * doc/xml/manual/status_cxx1998.xml: Likewise.
190 * doc/xml/manual/status_cxx2011.xml: Likewise.
191 * doc/xml/manual/status_cxx2014.xml: Likewise.
192 * doc/xml/manual/status_cxx2017.xml: Likewise.
193 * doc/xml/manual/status_cxx2020.xml: Likewise.
194 * doc/xml/manual/status_cxxtr1.xml: Likewise.
195 * doc/xml/manual/status_cxxtr24733.xml: Likewise.
197 2020-01-18 Iain Sandoe <iain@sandoe.co.uk>
199 * include/Makefile.am: Add coroutine to the std set.
200 * include/Makefile.in: Regenerated.
201 * include/std/coroutine: New file.
203 2020-01-17 Jonathan Wakely <jwakely@redhat.com>
206 * include/bits/c++config: Only do PSTL config when the header is
207 present, to fix freestanding.
208 * libsupc++/new_opa.cc [!_GLIBCXX_HOSTED]: Declare allocation
209 functions if they were detected by configure.
211 2020-01-16 Kai-Uwe Eckhardt <kuehro@gmx.de>
212 Matthew Bauer <mjbauer95@gmail.com>
213 Jonathan Wakely <jwakely@redhat.com>
215 PR bootstrap/64271 (partial)
216 * config/os/bsd/netbsd/ctype_base.h (ctype_base::mask): Change type
218 (ctype_base::alpha, ctype_base::digit, ctype_base::xdigit)
219 (ctype_base::print, ctype_base::graph, ctype_base::alnum): Sync
220 definitions with NetBSD upstream.
221 (ctype_base::blank): Use _CTYPE_BL.
222 * config/os/bsd/netbsd/ctype_configure_char.cc (_C_ctype_): Remove
224 (ctype<char>::classic_table): Use _C_ctype_tab_ instead of _C_ctype_.
225 (ctype<char>::do_toupper, ctype<char>::do_tolower): Cast char
226 parameters to unsigned char.
227 * config/os/bsd/netbsd/ctype_inline.h (ctype<char>::is): Likewise.
229 2020-01-16 François Dumont <fdumont@gcc.gnu.org>
232 * include/bits/hashtable.h (_Hashtable<>): Make _Equality<> friend.
233 * include/bits/hashtable_policy.h: Include <bits/stl_algo.h>.
234 (_Equality_base): Remove.
235 (_Equality<>::_M_equal): Review implementation. Use
237 * testsuite/23_containers/unordered_multiset/operators/1.cc
238 (Hash, Equal, test02, test03): New.
239 * testsuite/23_containers/unordered_set/operators/1.cc
240 (Hash, Equal, test02, test03): New.
242 2020-01-15 Jonathan Wakely <jwakely@redhat.com>
245 * include/bits/iterator_concepts.h (__max_diff_type, __max_size_type):
246 Move here from <bits/range_access.h> and define using __int128 when
248 (__is_integer_like, __is_signed_integer_like): Move here from
249 <bits/range_access.h>.
250 (weakly_incrementable): Use __is_signed_integer_like.
251 * include/bits/range_access.h (__max_diff_type, __max_size_type)
252 (__is_integer_like, __is_signed_integer_like): Move to
253 <bits/iterator_concepts.h>.
254 (__make_unsigned_like_t): Move here from <ranges>.
255 * include/std/ranges (__make_unsigned_like_t): Move to
256 <bits/range_access.h>.
257 (iota_view): Replace using-directive with using-declarations.
258 * testsuite/std/ranges/iota/93267.cc: New test.
259 * testsuite/std/ranges/iota_view.cc: Move to new 'iota' sub-directory.
261 2020-01-13 Jonathan Wakely <jwakely@redhat.com>
264 * include/bits/fs_path.h (path::generic_string<C,A>)
265 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Convert root-dir to forward-slash.
266 * testsuite/27_io/filesystem/path/generic/generic_string.cc: Check
267 root-dir is converted to forward slash in generic pathname.
268 * testsuite/27_io/filesystem/path/generic/utf.cc: New test.
269 * testsuite/27_io/filesystem/path/generic/wchar_t.cc: New test.
272 * include/bits/atomic_base.h (__cpp_lib_atomic_value_initialization):
274 (__atomic_flag_base, __atomic_base, __atomic_base<_PTp*>)
275 (__atomic_float): Add default member initializer for C++20.
276 * include/std/atomic (atomic): Likewise.
277 (atomic::atomic()): Remove noexcept-specifier on default constructor.
278 * include/std/version (__cpp_lib_atomic_value_initialization): Define.
279 * testsuite/29_atomics/atomic/cons/assign_neg.cc: Adjust dg-error line
281 * testsuite/29_atomics/atomic/cons/copy_neg.cc: Likewise.
282 * testsuite/29_atomics/atomic/cons/value_init.cc: New test.
283 * testsuite/29_atomics/atomic_flag/cons/value_init.cc: New test.
284 * testsuite/29_atomics/atomic_flag/requirements/trivial.cc: Adjust
285 expected result for is_trivially_default_constructible.
286 * testsuite/29_atomics/atomic_float/requirements.cc: Likewise.
287 * testsuite/29_atomics/atomic_float/value_init.cc: New test.
288 * testsuite/29_atomics/atomic_integral/cons/assign_neg.cc: Likewise.
289 * testsuite/29_atomics/atomic_integral/cons/copy_neg.cc: Likewise.
290 * testsuite/29_atomics/atomic_integral/cons/value_init.cc
291 * testsuite/29_atomics/atomic_integral/requirements/trivial.cc: Adjust
292 expected results for is_trivially_default_constructible.
293 * testsuite/util/testsuite_common_types.h (has_trivial_dtor): Add
296 2020-01-10 Jonathan Wakely <jwakely@redhat.com>
298 * testsuite/util/testsuite_iterators.h: Improve comment.
300 * testsuite/25_algorithms/equal/deque_iterators/1.cc: Don't use C++11
301 initialization syntax.
304 * include/bits/streambuf_iterator.h (istreambuf_iterator): Make type
305 of base class independent of __cplusplus value.
306 [__cplusplus < 201103L] (istreambuf_iterator::reference): Override the
307 type defined in the base class
308 * testsuite/24_iterators/istreambuf_iterator/92285.cc: New test.
309 * testsuite/24_iterators/istreambuf_iterator/requirements/
310 base_classes.cc: Adjust expected base class for C++98.
312 2020-01-09 Olivier Hainque <hainque@adacore.com>
314 * doc/xml/manual/appendix_contributing.xml: Document _C2
315 as a reserved identifier, by VxWorks.
316 * include/bits/stl_map.h: Rename _C2 template typenames as _Cmp2.
317 * include/bits/stl_multimap.h: Likewise.
319 2020-01-09 Jonathan Wakely <jwakely@redhat.com>
321 * include/ext/extptr_allocator.h (_ExtPtr_allocator::operator==)
322 (_ExtPtr_allocator::operator!=): Add missing const qualifiers.
323 * include/ext/pointer.h (readable_traits<_Pointer_adapter<S>>): Add
324 partial specialization to disambiguate the two constrained
327 * include/experimental/type_traits (experimental::is_pod_v): Disable
328 -Wdeprecated-declarations warnings around reference to std::is_pod.
329 * include/std/type_traits (is_pod_v): Likewise.
330 * testsuite/18_support/max_align_t/requirements/2.cc: Also check
331 is_standard_layout and is_trivial. Do not check is_pod for C++20.
332 * testsuite/20_util/is_pod/requirements/explicit_instantiation.cc:
333 Add -Wno-deprecated for C++20.
334 * testsuite/20_util/is_pod/requirements/typedefs.cc: Likewise.
335 * testsuite/20_util/is_pod/value.cc: Likewise.
336 * testsuite/experimental/type_traits/value.cc: Likewise.
338 2020-01-09 JeanHeyd "ThePhD" Meneide <phdofthehouse@gmail.com>
340 * include/bits/c++config (_GLIBCXX20_DEPRECATED): Add new macro.
341 * include/std/type_traits (is_pod, is_pod_v): Deprecate for C++20.
342 * testuite/20_util/is_pod/deprecated-2a.cc: New test.
344 2020-01-09 Jonathan Wakely <jwakely@redhat.com>
347 * include/bits/random.h (operator>>): Check stream operation succeeds.
348 * include/bits/random.tcc (operator<<): Remove redundant __ostream_type
350 (operator>>): Remove redundant __istream_type typedefs. Check stream
352 (__extract_params): New function to fill a vector from a stream.
353 * testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error line.
356 * config/abi/pre/gnu.ver: Add new exports.
357 * include/std/memory_resource (memory_resource::~memory_resource()):
358 Do not define inline.
359 (monotonic_buffer_resource::~monotonic_buffer_resource()): Likewise.
360 * src/c++17/memory_resource.cc (memory_resource::~memory_resource()):
362 (monotonic_buffer_resource::~monotonic_buffer_resource()): Define.
363 * testsuite/20_util/monotonic_buffer_resource/93208.cc: New test.
365 2020-01-09 François Dumont <fdumont@gcc.gnu.org>
368 * include/bits/hashtable.h (_Hashtable<>::__alloc_node_gen_t): New
370 (_Hashtable<>::__fwd_value_for): New.
371 (_Hashtable<>::_M_assign_elements<>): Remove _NodeGenerator template
373 (_Hashtable<>::_M_assign<>): Add _Ht template parameter.
374 (_Hashtable<>::operator=(const _Hashtable<>&)): Adapt.
375 (_Hashtable<>::_M_move_assign): Adapt. Replace std::move_if_noexcept
377 (_Hashtable<>::_Hashtable(const _Hashtable&)): Adapt.
378 (_Hashtable<>::_Hashtable(const _Hashtable&, const allocator_type&)):
380 (_Hashtable<>::_Hashtable(_Hashtable&&, const allocator_type&)):
382 * testsuite/23_containers/unordered_set/92124.cc: New.
384 2020-01-08 Jonathan Wakely <jwakely@redhat.com>
387 * src/c++17/fs_ops.cc (do_remove_all): New function implementing more
388 detailed error reporting for remove_all. Check result of recursive
389 call before incrementing iterator.
390 (remove_all(const path&), remove_all(const path&, error_code&)): Use
392 * src/filesystem/ops.cc (remove_all(const path&, error_code&)): Check
393 result of recursive call before incrementing iterator.
394 * testsuite/27_io/filesystem/operations/remove_all.cc: Check errors
395 are reported correctly.
396 * testsuite/experimental/filesystem/operations/remove_all.cc: Likewise.
398 2020-01-07 Thomas Rodgers <trodgers@redhat.com>
400 * include/std/condition_variable
401 (condition_variable_any::wait_on): Rename to match current draft
403 (condition_variable_any::wait_on_until): Likewise.
404 (condition_variable_any::wait_on_for): Likewise.
405 * testsuite/30_threads/condition_variable_any/stop_token/wait_on.cc:
406 Adjust tests to account for renamed methods.
408 2020-01-07 François Dumont <fdumont@gcc.gnu.org>
411 * include/bits/stl_tree.h
412 (_Rb_tree<>::_M_move_assign(_Rb_tree&, false_type)): Replace
413 std::move_if_noexcept by std::move.
414 * testsuite/23_containers/map/92124.cc: New.
415 * testsuite/23_containers/set/92124.cc: New.
417 2020-01-06 Jonathan Wakely <jwakely@redhat.com>
419 * include/std/stop_token (stop_token): Remove operator!= (LWG 3254).
420 (stop_source): Likewise (LWG 3362).
421 * testsuite/30_threads/stop_token/stop_source.cc: Test equality
424 * include/bits/stl_algobase.h (__is_byte_iter, __min_cmp)
425 (lexicographical_compare_three_way): Do not depend on
427 * include/std/version (__cpp_lib_three_way_comparison): Only define
428 when __cpp_lib_concepts is defined.
429 * libsupc++/compare (__cpp_lib_three_way_comparison): Likewise.
431 2020-01-03 Jonathan Wakely <jwakely@redhat.com>
433 * include/bits/stl_algobase.h (lexicographical_compare_three_way):
434 Only define four-argument overload when __cpp_lib_concepts is defined.
436 2020-01-01 John David Anglin <danglin@gcc.gnu.org>
438 * config/abi/post/hppa-linux-gnu/baseline_symbols.txt: Update.
440 2020-01-01 Jakub Jelinek <jakub@redhat.com>
442 Update copyright years.
444 Copyright (C) 2020 Free Software Foundation, Inc.
446 Copying and distribution of this file, with or without modification,
447 are permitted in any medium without royalty provided the copyright
448 notice and this notice are preserved.