]> gcc.gnu.org Git - gcc.git/blame - libstdc++-v3/ChangeLog
libcpp: Diagnose __has_include outside of preprocessor directives [PR93545]
[gcc.git] / libstdc++-v3 / ChangeLog
CommitLineData
20fa702b
AB
12020-02-01 Andrew Burgess <andrew.burgess@embecosm.com>
2
3 * configure: Regenerate.
4
6e5a1963
PP
52020-01-31 Patrick Palka <ppalka@redhat.com>
6
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>.
13
5cd2e126
JW
142020-01-29 Jonathan Wakely <jwakely@redhat.com>
15
0a8f4feb
JW
16 PR libstdc++/92895
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):
27 Remove.
28 (stop_token::_Stop_cb::_M_run): New member function.
29 (stop_token::_Stop_state::_M_stopped, stop_token::_Stop_state::_M_mtx):
30 Remove.
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
40 of _M_value.
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
51 managing spinlock.
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,
59 replacing shared_ptr.
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
65 parameter.
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
73 test.
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:
77 New test.
78 * testsuite/30_threads/stop_token/stop_callback/invocable_neg.cc: New
79 test.
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
83 test.
84
f214ffb3
JW
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
89 requires-clause.
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().
94
83b02010
JW
95 PR libstdc++/93479
96 * libsupc++/compare (__3way_builtin_ptr_cmp): Require <=> to be valid.
97 * testsuite/18_support/comparisons/object/93479.cc: New test.
98
5cd2e126
JW
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.
108
759812fd
JW
1092020-01-28 Jonathan Wakely <jwakely@redhat.com>
110
72a9fd20
JW
111 PR libstdc++/93470
112 * include/bits/refwrap.h (reference_wrapper::operator()): Restrict
113 static assertion to object types.
114
759812fd
JW
115 PR libstdc++/93325
116 * acinclude.m4 (GLIBCXX_ENABLE_LIBSTDCXX_TIME): Use AC_SEARCH_LIBS for
117 clock_gettime instead of explicit glibc version check.
118 * configure: Regenerate.
119
a5d81aaa
JW
1202020-01-28 Martin Liska <mliska@suse.cz>
121
122 PR libstdc++/93478
123 * include/std/atomic: Fix typo.
124 * include/std/optional: Likewise.
125
1262020-01-27 Andrew Burgess <andrew.burgess@embecosm.com>
127
128 * configure: Regenerate.
129
389cd88c
JW
1302020-01-27 Jonathan Wakely <jwakely@redhat.com>
131
132 PR libstdc++/93426
133 * include/std/span (span): Fix deduction guide.
134 * testsuite/23_containers/span/deduction.cc: New test.
135
482eeff5
JW
1362020-01-24 Jonathan Wakely <jwakely@redhat.com>
137
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
141 and greater.
142 (partial_ordering, weak_ordering, strong_ordering): Remove
143 constructors taking __cmp_cat::_Eq parameters. Use renamed
144 enumerators.
145
e8e66971
MR
1462020-01-24 Maciej W. Rozycki <macro@wdc.com>
147
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.
163
7a900bce
AO
1642020-01-23 Alexandre Oliva <oliva@adacore.com>
165
f9e84b31
AO
166 * crossconfig.m4 (GLIBCXX_CHECK_MATH_DECL): Reject macros.
167 * configure: Rebuild.
168
7a900bce
AO
169 * testsuite/27_io/fpos/mbstate_t/1.cc: Zero-init mbstate_t.
170
04681fca
JW
1712020-01-23 Jonathan Wakely <jwakely@redhat.com>
172
173 PR libstdc++/91947
174 * include/Makefile.am (${host_builddir}/largefile-config.h): Simplify
175 rule.
176 * include/Makefile.in: Regenerate.
177
c784f162
JW
1782020-01-20 Jonathan Wakely <jwakely@redhat.com>
179
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.
184
f4d83eba
ER
1852020-01-19 Eric S. Raymond <esr@thyrsus.com>
186
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.
196
49789fd0
IS
1972020-01-18 Iain Sandoe <iain@sandoe.co.uk>
198
199 * include/Makefile.am: Add coroutine to the std set.
200 * include/Makefile.in: Regenerated.
201 * include/std/coroutine: New file.
202
0ba6a850
JW
2032020-01-17 Jonathan Wakely <jwakely@redhat.com>
204
205 PR libstdc++/92376
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.
210
98d56ea8
JW
2112020-01-16 Kai-Uwe Eckhardt <kuehro@gmx.de>
212 Matthew Bauer <mjbauer95@gmail.com>
213 Jonathan Wakely <jwakely@redhat.com>
214
215 PR bootstrap/64271 (partial)
216 * config/os/bsd/netbsd/ctype_base.h (ctype_base::mask): Change type
217 to unsigned short.
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
223 Declaration.
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.
228
d9165389
FD
2292020-01-16 François Dumont <fdumont@gcc.gnu.org>
230
231 PR libstdc++/91263
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
236 std::is_permutation.
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.
241
2a0f6c61
JW
2422020-01-15 Jonathan Wakely <jwakely@redhat.com>
243
244 PR libstdc++/93267
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
247 available.
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.
260
e4379a93
JW
2612020-01-13 Jonathan Wakely <jwakely@redhat.com>
262
fe7cc34f
JW
263 PR libstdc++/93244
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.
270
e4379a93
JW
271 PR libstdc++/58605
272 * include/bits/atomic_base.h (__cpp_lib_atomic_value_initialization):
273 Define.
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
280 number.
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
294 new test generator.
295
7918cb93
JW
2962020-01-10 Jonathan Wakely <jwakely@redhat.com>
297
68be73fc
JW
298 * testsuite/util/testsuite_iterators.h: Improve comment.
299
78f02e80
JW
300 * testsuite/25_algorithms/equal/deque_iterators/1.cc: Don't use C++11
301 initialization syntax.
302
7918cb93
JW
303 PR libstdc++/92285
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.
311
acd43917
OH
3122020-01-09 Olivier Hainque <hainque@adacore.com>
313
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.
318
caa39b2e
JW
3192020-01-09 Jonathan Wakely <jwakely@redhat.com>
320
1a788638
JW
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
325 specializations.
326
caa39b2e
JW
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.
337
1a6c5064
JTM
3382020-01-09 JeanHeyd "ThePhD" Meneide <phdofthehouse@gmail.com>
339
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.
343
d574c8aa
JW
3442020-01-09 Jonathan Wakely <jwakely@redhat.com>
345
160e95dc
JW
346 PR libstdc++/93205
347 * include/bits/random.h (operator>>): Check stream operation succeeds.
348 * include/bits/random.tcc (operator<<): Remove redundant __ostream_type
349 typedefs.
350 (operator>>): Remove redundant __istream_type typedefs. Check stream
351 operations succeed.
352 (__extract_params): New function to fill a vector from a stream.
353 * testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error line.
354
d574c8aa
JW
355 PR libstdc++/93208
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()):
361 Define.
362 (monotonic_buffer_resource::~monotonic_buffer_resource()): Define.
363 * testsuite/20_util/monotonic_buffer_resource/93208.cc: New test.
364
b9c84e95
FD
3652020-01-09 François Dumont <fdumont@gcc.gnu.org>
366
367 PR libstdc++/92124
368 * include/bits/hashtable.h (_Hashtable<>::__alloc_node_gen_t): New
369 template alias.
370 (_Hashtable<>::__fwd_value_for): New.
371 (_Hashtable<>::_M_assign_elements<>): Remove _NodeGenerator template
372 parameter.
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
376 with std::move.
377 (_Hashtable<>::_Hashtable(const _Hashtable&)): Adapt.
378 (_Hashtable<>::_Hashtable(const _Hashtable&, const allocator_type&)):
379 Adapt.
380 (_Hashtable<>::_Hashtable(_Hashtable&&, const allocator_type&)):
381 Adapt.
382 * testsuite/23_containers/unordered_set/92124.cc: New.
383
fff148b7
JW
3842020-01-08 Jonathan Wakely <jwakely@redhat.com>
385
386 PR libstdc++/93201
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
391 do_remove_all.
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.
397
9e3c1eb7
TR
3982020-01-07 Thomas Rodgers <trodgers@redhat.com>
399
400 * include/std/condition_variable
401 (condition_variable_any::wait_on): Rename to match current draft
402 standard.
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.
407
6af8819b
FD
4082020-01-07 François Dumont <fdumont@gcc.gnu.org>
409
410 PR libstdc++/92124
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.
416
f31a99f7
JW
4172020-01-06 Jonathan Wakely <jwakely@redhat.com>
418
a4a1f965
JW
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
422 comparisons.
423
f31a99f7
JW
424 * include/bits/stl_algobase.h (__is_byte_iter, __min_cmp)
425 (lexicographical_compare_three_way): Do not depend on
426 __cpp_lib_concepts.
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.
430
b4e70137
JW
4312020-01-03 Jonathan Wakely <jwakely@redhat.com>
432
433 * include/bits/stl_algobase.h (lexicographical_compare_three_way):
434 Only define four-argument overload when __cpp_lib_concepts is defined.
435
a8497ec6
JDA
4362020-01-01 John David Anglin <danglin@gcc.gnu.org>
437
438 * config/abi/post/hppa-linux-gnu/baseline_symbols.txt: Update.
439
8d9254fc 4402020-01-01 Jakub Jelinek <jakub@redhat.com>
5624e564
JJ
441
442 Update copyright years.
b4df5e92 443\f
8d9254fc 444Copyright (C) 2020 Free Software Foundation, Inc.
b4df5e92
JW
445
446Copying and distribution of this file, with or without modification,
447are permitted in any medium without royalty provided the copyright
448notice and this notice are preserved.
This page took 0.828568 seconds and 5 git commands to generate.