]> git.ipfire.org Git - thirdparty/gcc.git/blob - libstdc++-v3/ChangeLog
Daily bump.
[thirdparty/gcc.git] / libstdc++-v3 / ChangeLog
1 2023-09-04 Christophe Lyon <christophe.lyon@linaro.org>
2
3 PR libstdc++/111238
4 * configure: Regenerate.
5 * configure.ac: Call GLIBCXX_CHECK_LINKER_FEATURES in cross,
6 non-Canadian builds.
7
8 2023-09-04 Jonathan Wakely <jwakely@redhat.com>
9
10 * testsuite/26_numerics/complex/literals/types.cc: Remove
11 dg-options and add target selector instead.
12
13 2023-09-04 Jonathan Wakely <jwakely@redhat.com>
14
15 * testsuite/tr1/6_containers/utility/pair.cc: Remove dg-options
16 and qualify ambiguous calls to get.
17 * testsuite/tr1/8_c_compatibility/cmath/pow_cmath.cc: Adjust
18 expected result for std::pow(float, int) as per DR 550.
19
20 2023-09-04 Jonathan Wakely <jwakely@redhat.com>
21
22 * testsuite/20_util/auto_ptr/1.cc: Remove dg-options -std=c++03
23 and add dg-warning for deprecation warnings.
24 * testsuite/20_util/auto_ptr/2.cc: Likewise.
25 * testsuite/20_util/auto_ptr/3.cc: Likewise.
26 * testsuite/20_util/auto_ptr/3946.cc: Likewise.
27 * testsuite/20_util/auto_ptr/4.cc: Likewise.
28 * testsuite/20_util/auto_ptr/5.cc: Likewise.
29 * testsuite/20_util/auto_ptr/6.cc: Likewise.
30 * testsuite/20_util/auto_ptr/7.cc: Likewise.
31 * testsuite/20_util/auto_ptr/assign_neg.cc: Likewise.
32 * testsuite/20_util/auto_ptr/requirements/explicit_instantiation/1.cc:
33 Likewise.
34 * testsuite/tr1/2_general_utilities/shared_ptr/assign/auto_ptr.cc:
35 Likewise.
36 * testsuite/tr1/2_general_utilities/shared_ptr/assign/auto_ptr_neg.cc:
37 Likewise.
38 * testsuite/tr1/2_general_utilities/shared_ptr/assign/auto_ptr_rvalue_neg.cc:
39 Likewise.
40 * testsuite/tr1/2_general_utilities/shared_ptr/cons/43820_neg.cc:
41 Likewise.
42 * testsuite/tr1/2_general_utilities/shared_ptr/cons/auto_ptr.cc:
43 Likewise.
44 * testsuite/tr1/2_general_utilities/shared_ptr/cons/auto_ptr_neg.cc:
45 Likewise.
46
47 2023-09-04 Jonathan Wakely <jwakely@redhat.com>
48
49 PR libstdc++/26142
50 * testsuite/23_containers/vector/26412-1.cc: Moved to...
51 * testsuite/23_containers/vector/26142-1.cc: ...here.
52 * testsuite/23_containers/vector/26412-2.cc: Moved to...
53 * testsuite/23_containers/vector/26142-2.cc: ...here.
54
55 2023-09-04 Jonathan Wakely <jwakely@redhat.com>
56
57 * testsuite/20_util/bitset/107037.cc: Add c++98_only selector.
58 * testsuite/26_numerics/complex/56111.cc: Likewise.
59
60 2023-09-04 Jonathan Wakely <jwakely@redhat.com>
61
62 * testsuite/23_containers/deque/requirements/explicit_instantiation/2.cc:
63 Add dg-options to restrict the test to C++98 mode.
64 * testsuite/23_containers/list/requirements/explicit_instantiation/2.cc:
65 Likewise.
66
67 2023-09-04 Jonathan Wakely <jwakely@redhat.com>
68
69 * testsuite/20_util/expected/bad.cc: Add missing target
70 selector.
71
72 2023-09-01 Jonathan Wakely <jwakely@redhat.com>
73
74 * testsuite/25_algorithms/copy/debug/constexpr_neg.cc: Adjust
75 expected errors.
76 * testsuite/25_algorithms/equal/debug/constexpr_neg.cc:
77 Likewise.
78
79 2023-09-01 Jonathan Wakely <jwakely@redhat.com>
80
81 * testsuite/27_io/filesystem/iterators/91067.cc: Add
82 -Wno-self-move to options.
83 * testsuite/27_io/filesystem/path/assign/copy.cc: Likewise.
84
85 2023-09-01 Vladimir Palevich <palevichva@gmail.com>
86
87 PR libstdc++/110879
88 * include/bits/vector.tcc (_M_realloc_insert): End guard
89 lifetime just before assignment to class members.
90 (_M_default_append): Likewise.
91
92 2023-09-01 Jonathan Wakely <jwakely@redhat.com>
93
94 * src/c++17/fs_ops.cc (fs::absolute) [FILESYSTEM_IS_WINDOWS]:
95 Use __resize_and_overwrite to fill buffer.
96 (fs::read_symlink) [HAVE_READLINK]: Likewise.
97 * src/filesystem/ops-common.h (get_temp_directory_from_env)
98 [FILESYSTEM_IS_WINDOWS]: Likewise.
99
100 2023-09-01 Jonathan Wakely <jwakely@redhat.com>
101
102 PR libstdc++/111077
103 * include/bits/atomic_base.h (__atomic_impl::__compare_exchange):
104 Add _AtomicRef non-type template parameter and use a loop if it
105 is true.
106 (__atomic_impl::compare_exchange_weak): Add _AtomicRef NTTP.
107 (__atomic_impl::compare_exchange_strong): Likewise.
108 (atomic_ref::compare_exchange_weak): Use true for NTTP.
109 (atomic_ref::compare_exchange_strong): Use true for NTTP.
110 * testsuite/29_atomics/atomic_ref/compare_exchange_padding.cc:
111 Fix test to not rely on atomic_ref::load() to return an object
112 with padding preserved.
113
114 2023-09-01 Jonathan Wakely <jwakely@redhat.com>
115
116 * testsuite/27_io/filesystem/path/108636.cc: Add dg-require for
117 filesystem support.
118
119 2023-09-01 Jonathan Wakely <jwakely@redhat.com>
120
121 * src/c++20/tzdb.cc (tzdb::current_zone): Check configure macros
122 for POSIX readlink before using filesystem::read_symlink.
123
124 2023-09-01 Jonathan Wakely <jwakely@redhat.com>
125
126 * acinclude.m4 (GLIBCXX_ENABLE_BACKTRACE): Default to yes.
127 * configure: Regenerate.
128
129 2023-09-01 Jonathan Wakely <jwakely@redhat.com>
130
131 * include/bits/chrono_io.h (_Parser::operator()): Set failbit
132 early if invalid values are read when _M_need & _TimeOfDay is
133 non-zero.
134 * testsuite/std/time/parse.cc: Check that "25:59" cannot be
135 parsed for "%H:%M".
136
137 2023-09-01 Jonathan Wakely <jwakely@redhat.com>
138
139 PR libstdc++/111162
140 * include/bits/chrono_io.h (_Parser::Operator()): Check %C
141 values are in range of year::min() to year::max().
142 * testsuite/std/time/parse.cc: Check out of range centuries.
143
144 2023-09-01 Jonathan Wakely <jwakely@redhat.com>
145
146 * include/std/format (__format::_Sink::_M_reset): Change second
147 argument from iterator to offset.
148
149 2023-08-24 Paul Dreik <gccpatches@pauldreik.se>
150
151 PR libstdc++/111102
152 * testsuite/std/format/string.cc: Check wide character format
153 strings with out-of-range widths.
154
155 2023-08-24 Paul Dreik <gccpatches@pauldreik.se>
156
157 PR libstdc++/111102
158 * include/std/format (__format::__parse_integer): Check for
159 non-null pointer.
160
161 2023-08-24 Jonathan Wakely <jwakely@redhat.com>
162
163 * testsuite/std/format/functions/format_to.cc: Avoid warning for
164 unused variables.
165
166 2023-08-24 Jonathan Wakely <jwakely@redhat.com>
167
168 * include/std/atomic: Add comment to #ifdef and fix indentation.
169 * include/std/ostream: Check __glibcxx_syncbuf instead of
170 __cplusplus and _GLIBCXX_HOSTED.
171 * include/std/thread: Add comment to #ifdef.
172
173 2023-08-24 Jonathan Wakely <jwakely@redhat.com>
174
175 * include/bits/version.def (__cpp_lib_ratio): Define.
176 * include/bits/version.h: Regenerate.
177 * include/std/ratio (quecto, ronto, yocto, zepto)
178 (zetta, yotta, ronna, quetta): Define.
179 * testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Adjust
180 dg-error line numbers.
181
182 2023-08-24 Jonathan Wakely <jwakely@redhat.com>
183
184 * python/libstdcxx/v6/printers.py (StdLocalePrinter): New
185 printer class.
186 * testsuite/libstdc++-prettyprinters/locale.cc: New test.
187
188 2023-08-24 Jonathan Wakely <jwakely@redhat.com>
189
190 PR libstdc++/110944
191 * python/libstdcxx/v6/printers.py (StdExpOptionalPrinter): Do
192 not show template arguments.
193 (StdVariantPrinter): Likewise.
194 * testsuite/libstdc++-prettyprinters/compat.cc: Adjust expected
195 output.
196 * testsuite/libstdc++-prettyprinters/cxx17.cc: Likewise.
197 * testsuite/libstdc++-prettyprinters/libfundts.cc: Likewise.
198
199 2023-08-23 François Dumont <fdumont@gcc.gnu.org>
200
201 * testsuite/util/replacement_memory_operators.h
202 (counter::scope): New, capture and reset counter count at construction and
203 restore it at destruction.
204 (counter::check_new): Add scope instantiation.
205 * testsuite/23_containers/unordered_map/96088.cc (main):
206 Add counter::scope instantiation.
207 * testsuite/23_containers/unordered_multimap/96088.cc (main): Likewise.
208 * testsuite/23_containers/unordered_multiset/96088.cc (main): Likewise.
209 * testsuite/23_containers/unordered_set/96088.cc (main): Likewise.
210 * testsuite/ext/malloc_allocator/deallocate_local.cc (main): Likewise.
211 * testsuite/ext/new_allocator/deallocate_local.cc (main): Likewise.
212 * testsuite/ext/throw_allocator/deallocate_local.cc (main): Likewise.
213 * testsuite/ext/pool_allocator/allocate_chunk.cc (started): New global.
214 (operator new(size_t)): Check started.
215 (main): Set/Unset started.
216 * testsuite/17_intro/no_library_allocation.cc: New test case.
217
218 2023-08-21 Jonathan Wakely <jwakely@redhat.com>
219
220 * testsuite/18_support/nested_exception/rethrow_if_nested-term.cc:
221 Call std::set_terminate before throwing the nested exception.
222
223 2023-08-18 Jonathan Wakely <jwakely@redhat.com>
224
225 PR target/111060
226 * include/std/format (formatter): Only define specializations
227 for 16-bit floating-point types for C++23.
228 * include/std/limits (numeric_limits): Likewise.
229
230 2023-08-18 Jonathan Wakely <jwakely@redhat.com>
231
232 * include/bits/chrono_io.h (operator<<): Make uses of wide
233 strings with streams and std::format type-dependent on _CharT.
234 * include/std/format [!_GLIBCXX_USE_WCHAR_T] Do not use
235 __to_wstring_numeric.
236
237 2023-08-18 Jonathan Wakely <jwakely@redhat.com>
238
239 * include/bits/chrono_io.h (operator<<): Use __format_context.
240 * include/std/format (__format::__format_context): New alias
241 template.
242 [!_GLIBCXX_USE_WCHAR_T] (wformat_args, make_wformat_arg):
243 Disable.
244
245 2023-08-17 Jonathan Wakely <jwakely@redhat.com>
246
247 Revert:
248 2023-08-17 Jonathan Wakely <jwakely@redhat.com>
249
250 * config/locale/generic/c_locale.cc (__convert_to_v): Reuse
251 double overload for long double if possible.
252
253 2023-08-17 Jonathan Wakely <jwakely@redhat.com>
254
255 * src/c++20/tzdb.cc (tzdata_file, leaps_file): Change type to
256 std::string_view.
257
258 2023-08-17 Jonathan Wakely <jwakely@redhat.com>
259
260 * config/locale/generic/c_locale.cc (__convert_to_v): Reuse
261 double overload for long double if possible.
262
263 2023-08-17 Jonathan Wakely <jwakely@redhat.com>
264
265 * src/c++98/localename.cc (is_C_locale): New function.
266 (locale::locale(const char*)): Use is_C_locale.
267
268 2023-08-17 Jonathan Wakely <jwakely@redhat.com>
269
270 PR libstdc++/110945
271 * include/bits/basic_string.h (basic_string::assign(Iter, Iter)):
272 Dispatch to _M_replace or move assignment from a temporary,
273 based on the iterator type.
274
275 2023-08-17 Jonathan Wakely <jwakely@redhat.com>
276
277 * include/std/format (formatter): Add partial specializations
278 for extended floating-point types.
279 * testsuite/std/format/functions/format.cc: Move test_float128()
280 to ...
281 * testsuite/std/format/formatter/ext_float.cc: New test.
282
283 2023-08-17 Jonathan Wakely <jwakely@redhat.com>
284
285 * include/bits/c++config (__gnu_cxx::__bfloat16_t): Define
286 whenever __BFLT16_DIG__ is defined, not only for C++23.
287 * include/std/limits (numeric_limits<bfloat16_t>): Likewise.
288 (numeric_limits<_Float16>, numeric_limits<_Float32>)
289 (numeric_limits<_Float64>): Likewise for other extended
290 floating-point types.
291
292 2023-08-17 Jonathan Wakely <jwakely@redhat.com>
293
294 * include/experimental/internet (address_v4::to_string): Remove
295 unused parameter name.
296
297 2023-08-17 Jonathan Wakely <jwakely@redhat.com>
298
299 * libsupc++/compare (__cmp_cat::__unseq): Make ctor consteval.
300 * testsuite/18_support/comparisons/categories/zero_neg.cc: Prune
301 excess errors caused by invalid consteval calls.
302
303 2023-08-17 Jonathan Wakely <jwakely@redhat.com>
304
305 * include/bits/chrono_io.h (__units_suffix_misc): Remove.
306 (__units_suffix): Return a known suffix as string view, do not
307 write unknown suffixes to a buffer.
308 (__fmt_units_suffix): New function that formats the suffix using
309 std::format_to.
310 (operator<<, __chrono_formatter::_M_q): Use __fmt_units_suffix.
311 (__chrono_formatter::_M_Z): Correct lifetime of wstring.
312
313 2023-08-17 Jonathan Wakely <jwakely@redhat.com>
314
315 * include/std/format [_GLIBCXX_USE_WCHAR_T]: Guard all wide
316 string formatters with this macro.
317 (__formatter_int::_M_format_int, __formatter_fp::format)
318 (formatter<const void*, C>::format): Use __to_wstring_numeric
319 instead of std::ctype::widen.
320 (__formatter_fp::_M_localize): Use hardcoded wchar_t values
321 instead of std::ctype::widen.
322 * testsuite/std/format/functions/format.cc: Add more checks for
323 wstring formatting of arithmetic types.
324
325 2023-08-17 Jonathan Wakely <jwakely@redhat.com>
326
327 * include/bits/basic_string.h (to_string(floating-point-type)):
328 Implement using std::to_chars for C++26.
329 * include/bits/version.def (__cpp_lib_to_string): Define.
330 * include/bits/version.h: Regenerate.
331 * testsuite/21_strings/basic_string/numeric_conversions/char/dr1261.cc:
332 Adjust expected result in C++26 mode.
333 * testsuite/21_strings/basic_string/numeric_conversions/char/to_string.cc:
334 Likewise.
335 * testsuite/21_strings/basic_string/numeric_conversions/wchar_t/dr1261.cc:
336 Likewise.
337 * testsuite/21_strings/basic_string/numeric_conversions/wchar_t/to_wstring.cc:
338 Likewise.
339 * testsuite/21_strings/basic_string/numeric_conversions/char/to_string_float.cc:
340 New test.
341 * testsuite/21_strings/basic_string/numeric_conversions/wchar_t/to_wstring_float.cc:
342 New test.
343 * testsuite/21_strings/basic_string/numeric_conversions/version.cc:
344 New test.
345
346 2023-08-17 Jonathan Wakely <jwakely@redhat.com>
347
348 * include/bits/basic_string.h (to_string(integral-type)): Use
349 resize_and_overwrite when available.
350 (__to_wstring_numeric): New helper functions.
351 (to_wstring): Use std::to_string then __to_wstring_numeric.
352 * testsuite/21_strings/basic_string/numeric_conversions/char/to_string_int.cc:
353 Remove check for no excess capacity.
354
355 2023-08-17 Jonathan Wakely <jwakely@redhat.com>
356
357 * include/bits/basic_string.h (__resize_and_overwrite): New
358 function.
359 * include/bits/basic_string.tcc (__resize_and_overwrite): New
360 function.
361 (resize_and_overwrite): Simplify by using reserve instead of
362 growing the string manually. Adjust for C++11 compatibility.
363 * include/bits/cow_string.h (resize_and_overwrite): New
364 function.
365 (__resize_and_overwrite): New function.
366 * include/bits/version.def (__cpp_lib_string_resize_and_overwrite):
367 Do not depend on cxx11abi.
368 * include/bits/version.h: Regenerate.
369 * include/std/format (__formatter_fp::_S_resize_and_overwrite):
370 Remove.
371 (__formatter_fp::format, __formatter_fp::_M_localize): Use
372 __resize_and_overwrite instead of _S_resize_and_overwrite.
373 * testsuite/21_strings/basic_string/capacity/char/resize_and_overwrite.cc:
374 Adjust for C++11 compatibility when included by ...
375 * testsuite/21_strings/basic_string/capacity/char/resize_and_overwrite_ext.cc:
376 New test.
377
378 2023-08-17 Patrick Palka <ppalka@redhat.com>
379
380 * include/bits/regex.h (regex_iterator::iterator_concept):
381 Define for C++20 as per P2770R0.
382 (regex_token_iterator::iterator_concept): Likewise.
383 * include/std/ranges (__detail::__as_lvalue): Define.
384 (join_view::_Iterator): Befriend join_view.
385 (join_view::_Iterator::_M_satisfy): Use _M_get_outer
386 instead of _M_outer.
387 (join_view::_Iterator::_M_get_outer): Define.
388 (join_view::_Iterator::_Iterator): Split constructor taking
389 _Parent argument into two as per P2770R0. Remove constraint on
390 default constructor.
391 (join_view::_Iterator::_M_outer): Make this data member present
392 only when the underlying range is forward.
393 (join_view::_Iterator::operator++): Use _M_get_outer instead of
394 _M_outer.
395 (join_view::_Iterator::operator--): Use __as_lvalue helper.
396 (join_view::_Iterator::operator==): Adjust constraints as per
397 P2770R0.
398 (join_view::_Sentinel::__equal): Use _M_get_outer instead of
399 _M_outer.
400 (join_view::_M_outer): New data member when the underlying range
401 is non-forward.
402 (join_view::begin): Adjust definition as per P2770R0.
403 (join_view::end): Likewise.
404 (join_with_view::_M_outer_it): New data member when the
405 underlying range is non-forward.
406 (join_with_view::begin): Adjust definition as per P2770R0.
407 (join_with_view::end): Likewise.
408 (join_with_view::_Iterator::_M_outer_it): Make this data member
409 present only when the underlying range is forward.
410 (join_with_view::_Iterator::_M_get_outer): Define.
411 (join_with_view::_Iterator::_Iterator): Split constructor
412 taking _Parent argument into two as per P2770R0. Remove
413 constraint on default constructor.
414 (join_with_view::_Iterator::_M_update_inner): Adjust definition
415 as per P2770R0.
416 (join_with_view::_Iterator::_M_get_inner): Likewise.
417 (join_with_view::_Iterator::_M_satisfy): Adjust calls to
418 _M_get_inner. Use _M_get_outer instead of _M_outer_it.
419 (join_with_view::_Iterator::operator==): Adjust constraints
420 as per P2770R0.
421 (join_with_view::_Sentinel::operator==): Use _M_get_outer
422 instead of _M_outer_it.
423 * testsuite/std/ranges/adaptors/p2770r0.cc: New test.
424
425 2023-08-17 Patrick Palka <ppalka@redhat.com>
426
427 PR libstdc++/108827
428 * include/std/ranges (__adaptor::_RangeAdaptorClosure):
429 Convert into a CRTP class template. Move hidden operator|
430 friends into namespace scope and adjust their constraints.
431 (__closure::__is_range_adaptor_closure_fn): Define.
432 (__closure::__is_range_adaptor_closure): Define.
433 (__adaptor::_Partial): Adjust use of _RangeAdaptorClosure.
434 (__adaptor::_Pipe): Likewise.
435 (views::_All): Likewise.
436 (views::_Join): Likewise.
437 (views::_Common): Likewise.
438 (views::_Reverse): Likewise.
439 (views::_Elements): Likewise.
440 (views::_Adjacent): Likewise.
441 (views::_AsRvalue): Likewise.
442 (views::_Enumerate): Likewise.
443 (views::_AsConst): Likewise.
444 * testsuite/std/ranges/adaptors/all.cc: Reinstate assertion
445 expecting that adding empty range adaptor closure objects to a
446 pipeline doesn't increase the size of a pipeline.
447
448 2023-08-17 Jonathan Wakely <jwakely@redhat.com>
449
450 * include/std/format (__format::_Pres_type): Add _Pres_F.
451 (__formatter_fp::parse): Use _Pres_F for 'F'.
452 (__formatter_fp::format): Set __upper for _Pres_F.
453 * testsuite/std/format/functions/format.cc: Check formatting of
454 infinity and NaN for each presentation type.
455
456 2023-08-17 Jonathan Wakely <jwakely@redhat.com>
457
458 * include/Makefile.in: Regenerate.
459
460 2023-08-17 Jonathan Wakely <jwakely@redhat.com>
461
462 * testsuite/24_iterators/move_iterator/p2520r0.cc: Add no_pch.
463 * testsuite/std/format/functions/format.cc: Likewise.
464 * testsuite/std/format/functions/format_c++23.cc: Likewise.
465
466 2023-08-17 Jonathan Wakely <jwakely@redhat.com>
467
468 * testsuite/lib/dg-options.exp (add_options_for_no_pch): Remove
469 any "-include bits/stdc++.h" from options and add the macro to
470 the existing options instead of replacing them.
471
472 2023-08-16 Jonathan Wakely <jwakely@redhat.com>
473
474 * include/bits/basic_string.tcc (resize_and_overwrite): Invoke
475 the callable with the same size as resize_and_overwrite was
476 called with.
477 * testsuite/21_strings/basic_string/capacity/char/resize_and_overwrite.cc:
478 Check with small values for the new size.
479 * testsuite/std/format/functions/format.cc: Check wide
480 formatting of double values that produce small strings.
481 * testsuite/std/format/functions/format_c++23.cc: New test.
482
483 2023-08-16 Jonathan Wakely <jwakely@redhat.com>
484
485 * include/bits/version.def (stds): Update value for C++23.
486 * include/bits/version.h: Regenerate.
487
488 2023-08-16 Jonathan Wakely <jwakely@redhat.com>
489
490 * testsuite/25_algorithms/pstl/alg_sorting/set_difference.cc:
491 Fix name of upstream file this was derived from.
492 * testsuite/25_algorithms/pstl/alg_sorting/set_intersection.cc:
493 Likewise.
494 * testsuite/25_algorithms/pstl/alg_sorting/set_symmetric_difference.cc:
495 Likewise.
496 * testsuite/25_algorithms/pstl/alg_sorting/set_union.cc:
497 Likewise.
498 * testsuite/25_algorithms/pstl/alg_sorting/set_util.h: Likewise.
499
500 2023-08-16 Arsen Arsenović <arsen@aarsen.me>
501
502 * libsupc++/typeinfo: Switch to bits/version.h for
503 __cpp_lib_constexpr_typeinfo.
504 * libsupc++/new: Switch to bits/version.h for
505 __cpp_lib_{launder,hardware_interference_size,destroying_delete}.
506 (launder): Guard behind __cpp_lib_launder.
507 (hardware_destructive_interference_size)
508 (hardware_constructive_interference_size): Guard behind
509 __cpp_lib_hardware_interference_size.
510 * libsupc++/exception: Switch to bits/version.h for
511 __cpp_lib_uncaught_exceptions.
512 (uncaught_exceptions): Guard behind __cpp_lib_uncaught_exceptions.
513 * libsupc++/compare: Switch to bits/version.h for
514 __cpp_lib_three_way_comparison.
515 (three_way_comparable, three_way_comparable_with)
516 (compare_three_way, weak_order, strong_order, partial_order):
517 Guard behind __cpp_lib_three_way_comparison >= 201907L.
518 * include/std/chrono: Drop __cpp_lib_chrono definition.
519 * include/std/vector: Switch to bits/version.h for
520 __cpp_lib_erase_if.
521 (erase, erase_if): Guard behind __cpp_lib_erase_if.
522 * include/std/variant: Switch to bits/version.h for
523 __cpp_lib_variant. Guard whole header behind that FTM.
524 * include/std/utility: Switch to bits/version.h for
525 __cpp_lib_{exchange_function,constexpr_algorithms,as_const},
526 __cpp_lib_{integer_comparison_functions,to_underlying}, and
527 __cpp_lib_unreachable.
528 (exchange): Guard behind __cpp_lib_exchange_function.
529 (cmp_equal, cmp_not_equal, cmp_less, cmp_greater, cmp_less_equal)
530 (cmp_greater_equal, in_range): Guard behind
531 __cpp_lib_integer_comparison_functions.
532 (to_underlying): Guard behind __cpp_lib_to_underlying.
533 (unreachable): Guard behind __cpp_lib_unreachable.
534 * include/std/type_traits: Switch to bits/version.h for
535 __cpp_lib_is_{null_pointer,final,nothrow_convertible,aggregate},
536 __cpp_lib_is_{constant_evaluated,invocable,layout_compatible},
537 __cpp_lib_is_{pointer_interconvertible,scoped_enum,swappable},
538 __cpp_lib_{logical_traits,reference_from_temporary,remove_cvref},
539 __cpp_lib_{result_of_sfinae,transformation_trait_aliases},
540 __cpp_lib_{type_identity,type_trait_variable_templates},
541 __cpp_lib_{unwrap_ref,void_t,integral_constant_callable},
542 __cpp_lib_{bool_constant,bounded_array_traits}, and
543 __cpp_lib_has_unique_object_representations.
544 (integral_constant::operator()): Guard behind
545 __cpp_lib_integral_constant_callable.
546 (bool_constant): Guard behind __cpp_lib_bool_constant.
547 (conjunction, disjunction, negation, conjunction_v, disjunction_v)
548 (negation_v): Guard behind __cpp_lib_logical_traits.
549 (is_null_pointer): Guard behind __cpp_lib_is_null_pointer.
550 (is_final): Guard behind __cpp_lib_is_final.
551 (is_nothrow_convertible, is_nothrow_convertible_v): Guard behind
552 __cpp_lib_is_nothrow_convertible.
553 (remove_const_t, remove_volatile_t, remove_cv_t)
554 (add_const_t, add_volatile_t, add_cv_t): Guard behind
555 __cpp_lib_transformation_trait_aliases.
556 (void_t): Guard behind __cpp_lib_void_t.
557 (is_swappable_with_v, is_nothrow_swappable_with_v)
558 (is_swappable_with, is_nothrow_swappable_with): Guard behind
559 __cpp_lib_is_swappable.
560 (is_nothrow_invocable_r, is_invocable_r, invoke_result)
561 (is_invocable, invoke_result_t): Guard behind
562 __cpp_lib_is_invocable.
563 (alignment_of_v, extent_v, has_virtual_destructor_v)
564 (is_abstract_v, is_arithmetic_v, is_array_v)
565 (is_assignable_v, is_base_of_v, is_class_v, is_compound_v)
566 (is_constructible_v, is_const_v, is_convertible_v)
567 (is_copy_assignable_v, is_copy_constructible_v)
568 (is_default_constructible_v, is_destructible_v)
569 (is_empty_v, is_enum_v, is_final_v, is_floating_point_v)
570 (is_function_v, is_fundamental_v, is_integral_v)
571 (is_invocable_r_v, is_invocable_v, is_literal_type_v)
572 (is_lvalue_reference_v, is_member_function_pointer_v)
573 (is_member_object_pointer_v, is_member_pointer_v)
574 (is_move_assignable_v, is_move_constructible_v)
575 (is_nothrow_assignable_v, is_nothrow_constructible_v)
576 (is_nothrow_copy_assignable_v, is_nothrow_copy_constructible_v)
577 (is_nothrow_default_constructible_v, is_nothrow_destructible_v)
578 (is_nothrow_invocable_r_v, is_nothrow_invocable_v)
579 (is_nothrow_move_assignable_v, is_nothrow_move_constructible_v)
580 (is_null_pointer_v, is_object_v, is_pod_v, is_pointer_v)
581 (is_polymorphic_v, is_reference_v, is_rvalue_reference_v)
582 (is_same_v, is_scalar_v, is_signed_v, is_standard_layout_v)
583 (is_trivially_assignable_v, is_trivially_constructible_v)
584 (is_trivially_copyable_v, is_trivially_copy_assignable_v)
585 (is_trivially_copy_constructible_v)
586 (is_trivially_default_constructible_v)
587 (is_trivially_destructible_v, is_trivially_move_assignable_v)
588 (is_trivially_move_constructible_v, is_trivial_v, is_union_v)
589 (is_unsigned_v, is_void_v, is_volatile_v, rank_v, as variadic):
590 Guard behind __cpp_lib_type_trait_variable_templates.
591 (has_unique_object_representations)
592 (has_unique_object_representations_v): Guard behind
593 __cpp_lib_has_unique_object_representation.
594 (is_aggregate): Guard behind __cpp_lib_is_aggregate.
595 (remove_cvref, remove_cvref_t): Guard behind
596 __cpp_lib_remove_cvref.
597 (type_identity, type_identity_t): Guard behind
598 __cpp_lib_type_identity.
599 (unwrap_reference, unwrap_reference_t, unwrap_ref_decay)
600 (unwrap_ref_decay_t): Guard behind __cpp_lib_unwrap_ref.
601 (is_bounded_array_v, is_unbounded_array_v, is_bounded_array)
602 (is_unbounded_array): Guard behind __cpp_lib_bounded_array_traits.
603 (is_scoped_enum, is_scoped_enum_v): Guard behind
604 __cpp_lib_is_scoped_enum.
605 (reference_constructs_from_temporary)
606 (reference_constructs_from_temporary_v): Guard behind
607 __cpp_lib_reference_from_temporary.
608 * include/std/tuple: Switch to bits/version.h for
609 __cpp_lib_{constexpr_tuple,tuple_by_type,apply_make_from_tuple}.
610 (get<T>): Guard behind __cpp_lib_tuple_by_type.
611 (apply): Guard behind __cpp_lib_apply.
612 (make_from_tuple): Guard behind __cpp_lib_make_from_tuple.
613 * include/std/syncstream: Switch to bits/version.h for
614 __cpp_lib_syncbuf. Guard header behind that FTM.
615 * include/std/string_view: Switch to bits/version.h for
616 __cpp_lib_{string_{view,contains},constexpr_string_view} and
617 __cpp_lib_starts_ends_with.
618 (basic_string_view::starts_with, basic_string_view::ends_with):
619 Guard behind __cpp_lib_starts_ends_with.
620 [C++23 && _GLIBCXX_HOSTED && !defined(__cpp_lib_string_contains)]:
621 Assert as impossible ithout a bug in C++23.
622 * include/std/string: Switch to bits/version.h for
623 __cpp_lib_erase_if.
624 (erase, erase_if): Guard behind __cpp_lib_erase_if.
625 * include/std/thread: Switch to bits/version.h for
626 __cpp_lib_jthread.
627 * include/std/stop_token: Switch to bits/version.h for
628 __cpp_lib_jthread.
629 * include/std/spanstream: Switch to bits/version.h for
630 __cpp_lib_spanstream. Guard header behind that FTM.
631 * include/std/span: Switch to bits/version.h for __cpp_lib_span.
632 Guard header behind that FTM.
633 * include/std/source_location: Switch to bits/version.h for
634 __cpp_lib_source_location. Guard header with that FTM.
635 * include/std/shared_mutex: Switch to bits/version.h for
636 __cpp_lib_shared{,_timed}_mutex.
637 (shared_mutex): Guard behind __cpp_lib_shared_mutex.
638 * include/std/semaphore: Switch to bits/version.h for
639 __cpp_lib_semaphore. Guard header behind that FTM.
640 * include/std/ranges: Switch to bits/version.h for
641 __cpp_lib_ranges_{zip,chunk{,_by},slide,join_with},
642 __cpp_lib_ranges_{repeat_stride,cartesian_product,as_rvalue},
643 and __cpp_lib_ranges_{as_const,enumerate,iota}.
644 (ranges::zip et al, ranges::chunk et al, ranges::slide et al)
645 (ranges::chunk_by et al, ranges::join_with et al)
646 (ranges::stride et al, ranges::cartesian_product et al)
647 (ranges::as_rvalue et al, ranges::as_const et al)
648 (ranges::enumerate et al): Guard behind appropriate FTM.
649 * include/std/optional: Switch to bits/version.h for
650 __cpp_lib_optional. Guard header behind that FTM.
651 * include/std/numeric: Switch to bits/version.h for
652 __cpp_lib_{gcd{,_lcm},lcm,constexpr_numeric,interpolate}
653 and __cpp_lib_parallel_algorithm.
654 (gcd, lcm): Guard behind __cpp_lib_gcd_lcm.
655 (midpoint): Guard behind __cpp_lib_interpolate.
656 * include/std/numbers: Switch to bits/version.h for
657 __cpp_lib_math_constants. Guard header behind that FTM.
658 * include/std/mutex: Switch to bits/version.h for
659 __cpp_lib_scoped_lock.
660 (scoped_Lock): Guard behind __cpp_lib_scoped_lock.
661 * include/std/memory_resource: Switch to bits/version.h for
662 __cpp_lib_{polymorphic_allocator,memory_resource}.
663 (synchronized_pool_resource): Guard behind
664 __cpp_lib_memory_resource >= 201603L.
665 (polymorphic_allocator): Guard behind
666 __cpp_lib_polymorphic_allocator.
667 * include/std/memory: Switch to bits/version.h for
668 __cpp_lib_{parallel_algorithm,atomic_value_initialization}.
669 * include/std/list: Switch to bits/version.h for
670 __cpp_lib_erase_if.
671 (erase, erase_if): Guard behind __cpp_lib_erase_if.
672 * include/std/latch: Switch to bits/version.h for __cpp_lib_latch.
673 Guard header behind that FTM.
674 * include/std/iterator: Switch to bits/version.h for
675 __cpp_lib_null_iterators.
676 * include/std/iomanip: Switch to bits/version.h for
677 __cpp_lib_quoted_string_io.
678 (quoted): Guard behind __cpp_lib_quoted_string_io.
679 * include/std/functional: Switch to bits/version.h for
680 __cpp_lib_{invoke{,_r},constexpr_functional,bind_front} and
681 __cpp_lib_{not_fn,booyer_moore_searcher}.
682 (invoke): Guard behind __cpp_lib_invoke.
683 (invoke_r): Guard behind __cpp_lib_invoke_r.
684 (bind_front): Guard behind __cpp_lib_bind_front.
685 (not_fn): Guard behind __cpp_lib_not_fn.
686 (boyer_moore_searcher, boyer_moore_horspool_searcher): Guard
687 definition behind __cpp_lib_boyer_moore_searcher.
688 * include/std/forward_list: Switch to bits/version.h for
689 __cpp_lib_erase_if.
690 (erase, erase_if): Guard behind __cpp_lib_erase_if.
691 * include/std/format: Switch to bits/version.h for
692 __cpp_lib_format. Guard header behind that FTM.
693 * include/std/filesystem: Switch to bits/version.h for
694 __cpp_lib_filesystem. Guard header behind that FTM.
695 * include/std/expected: Switch to bits/version.h for
696 __cpp_lib_expected. Guard header behind it.
697 * include/std/execution: Switch to bits/version.h for
698 __cpp_lib_{execution,parallel_algorithm}. Guard header behind
699 either.
700 * include/std/deque: Switch to bits/version.h for
701 __cpp_lib_erase_if.
702 (erase, erase_if): Guard behind __cpp_lib_erase_if.
703 * include/std/coroutine: Switch to bits/version.h for
704 __cpp_lib_coroutine. Guard header behind that FTM.
705 * include/std/concepts: Switch to bits/version.h for
706 __cpp_lib_concepts. Guard header behind that FTM.
707 * include/std/complex: Switch to bits/version.h for
708 __cpp_lib_{complex_udls,constexpr_complex}.
709 (operator""if, operator""i, operator""il): Guard behind
710 __cpp_lib_complex_udls.
711 * include/std/charconv: Swtich to bits/version.h for
712 __cpp_lib_{to_chars,constexpr_charconv}.
713 * include/std/bitset: Switch to bits/version.h for
714 __cpp_lib_constexpr_bitset.
715 * include/std/bit: Switch to bits/version.h for
716 __cpp_lib_{bit_cast,byteswap,bitops,int_pow2,endian}.
717 (bit_cast): Guard behind __cpp_lib_bit_cast.
718 (byteswap): Guard behind __cpp_lib_byteswap.
719 (rotl, rotr, countl_zero, countl_one, countr_zero, countr_one)
720 (popcount): Guard behind __cpp_lib_bitops.
721 (has_single_bit, bit_ceil, bit_floor, bit_width): Guard behind
722 __cpp_lib_int_pow2.
723 (endian): Guard behind __cpp_lib_endian.
724 * include/std/barrier: Switch to bits/version.h for
725 __cpp_lib_barrier. Guard header behind that FTM.
726 * include/std/atomic: Switch to bits/version.h for
727 __cpp_lib_atomic_{is_always_lock_free,float,ref}
728 and __cpp_lib_lock_free_type_aliases.
729 (*::is_always_lock_free): Guard behind
730 __cpp_lib_atomic_is_always_lock_free.
731 (atomic<float>): Guard behind __cpp_lib_atomic_float.
732 (atomic_ref): Guard behind __cpp_lib_atomic_ref.
733 (atomic_signed_lock_free, atomic_unsigned_lock_free): Guard behind
734 __cpp_lib_atomic_lock_free_type_aliases.
735 * include/std/array: Switch to bits/version.h for
736 __cpp_lib_to_array.
737 (to_array): Guard behind __cpp_lib_to_array.
738 * include/std/any: Switch to bits/version.h for __cpp_lib_any.
739 Guard header behind that FTM.
740 * include/std/algorithm: Switch to bits/version.h for
741 __cpp_lib_parallel_algorithm.
742 * include/c_global/cstddef: Switch to bits/version.h for
743 __cpp_lib_byte.
744 (byte): Guard behind __cpp_lib_byte.
745 * include/c_global/cmath: Switch to bits/version.h for
746 __cpp_lib_{hypot,interpolate}.
747 (hypot3): Guard behind __cpp_lib_hypot.
748 (lerp): Guard behind __cpp_lib_interpolate.
749 * include/c_compatibility/stdatomic.h: Switch to
750 bits/stl_version.h for __cpp_lib_atomic. Guard header behind that
751 FTM.
752 * include/bits/utility.h: Switch to bits/version.h for
753 __cpp_lib_{tuple_element_t,integer_sequence,ranges_zip}.
754 (tuple_element_t): Guard behind __cpp_lib_tuple_element_t.
755 (integer_sequence et al): Guard behind __cpp_lib_integer_sequence.
756 * include/bits/uses_allocator_args.h: Switch to bits/version.h for
757 __cpp_lib_make_obj_using_allocator. Guard header behind that FTM.
758 * include/bits/unordered_map.h: Switch to bits/version.h for
759 __cpp_lib_unordered_map_try_emplace.
760 (try_emplace): Guard behind __cpp_lib_unordered_map_try_emplace.
761 * include/bits/unique_ptr.h: Switch to bits/version.h for
762 __cpp_lib_{constexpr_memory,make_unique}.
763 (make_unique): Guard behind __cpp_lib_make_unique.
764 * include/bits/stl_vector.h: Switch to bits/version.h for
765 __cpp_lib_constexpr_vector.
766 * include/bits/stl_uninitialized.h: Switch to bits/version.h for
767 __cpp_lib_raw_memory_algorithms.
768 (uninitialized_default_construct)
769 (uninitialized_default_construct_n, uninitialized_move)
770 (uninitialized_move_n, uninitialized_value_construct)
771 (uninitialized_value_construct_n): Guard behind
772 __cpp_lib_raw_memory_algorithms.
773 * include/bits/stl_tree.h: Switch to bits/version.h for
774 __cpp_lib_generic_associative_lookup.
775 * include/bits/stl_stack.h: Switch to bits/version.h for
776 __cpp_lib_adaptor_iterator_pair_constructor.
777 (stack): Guard iterator-pair constructor behind
778 __cpp_lib_adaptor_iterator_pair_constructor.
779 * include/bits/stl_queue.h: Switch to bits/version.h for
780 __cpp_lib_adaptor_iterator_pair_constructor.
781 (queue): Guard iterator-pair constructor behind
782 __cpp_lib_adaptor_iterator_pair_constructor.
783 * include/bits/stl_pair.h: Switch to bits/version.h for
784 __cpp_lib_{concepts,tuples_by_type}.
785 (get): Guard type-getting overloads behind
786 __cpp_lib_tuples_by_type.
787 * include/bits/stl_map.h: Switch to bits/version.h for
788 __cpp_lib_map_try_emplace.
789 (map<>::try_emplace): Guard behind __cpp_lib_map_try_emplace.
790 * include/bits/stl_list.h: Switch to bits/version.h for
791 __cpp_lib_list_remove_return_type.
792 (__remove_return_type, _GLIBCXX_LIST_REMOVE_RETURN_TYPE_TAG)
793 [C++20]: guard behind __cpp_lib_list_remove_return_type instead.
794 * include/bits/stl_iterator.h: Switch to bits/version.h for
795 __cpp_lib_{constexpr_iterator,array_constexpr} and
796 __cpp_lib_{make_reverse_iterator,move_iterator_concept}.
797 (make_reverse_iterator): Guard behind
798 __cpp_lib_make_reverse_iterator.
799 (iterator_concept et al): Guard __cpp_lib_move_iterator_concept
800 changes behind that FTM.
801 * include/bits/stl_function.h: Switch to bits/version.h for
802 __cpp_lib_transparent_operators.
803 (equal_to, not_equal_to, greater, less, greater_equal)
804 (less_equal, bit_and, bit_or, bit_xor, bit_not, logical_and)
805 (logical_or, logical_not, plus, minus, multiplies, divides)
806 (modulus, negate): Guard '= void' fwdecls behind
807 __cpp_lib_transparent_operators.
808 (plus<void>, minus<void>, multiplies<void>, divides<void>)
809 (modulus<void>, negate<void>, logical_and<void>, logical_or<void>)
810 (logical_not<void>, bit_and<void>, bit_or<void>, bit_xor<void>)
811 (equal_to<void>, not_equal_to<void>, greater<void>, less<void>)
812 (greater_equal<void>, less_equal<void>, bit_not<void>)
813 (__has_is_transparent): Guard behind
814 __cpp_lib_transparent_operators.
815 * include/bits/stl_algobase.h: Switch to bits/version.h for
816 __cpp_lib_robust_nonmodifying_seq_ops.
817 (robust equal, mismatch): Guard behind
818 __cpp_lib_nonmember_container_access.
819 * include/bits/stl_algo.h: Swtich to bits/version.h for
820 __cpp_lib_{clamp,sample}.
821 (clamp): Guard behind __cpp_lib_clamp.
822 (sample): Guard behind __cpp_lib_sample.
823 * include/bits/specfun.h: Switch to bits/version.h for
824 __cpp_lib_math_special_functions and __STDCPP_MATH_SPEC_FUNCS__.
825 * include/bits/shared_ptr_base.h: Switch to bits/version.h for
826 __cpp_lib_{smart_ptr_for_overwrite,shared_ptr_arrays}.
827 (_Sp_overwrite_tag): Guard behind
828 __cpp_lib_smart_ptr_for_overwrite.
829 * include/bits/shared_ptr_atomic.h: Switch to bits/version.h for
830 __cpp_lib_atomic_shared_ptr.
831 * include/bits/shared_ptr.h: Switch to bits/version.h for
832 __cpp_lib_{enable_shared_from_this,shared_ptr_weak_type}.
833 (shared_ptr<T>::weak_type): Guard behind
834 __cpp_lib_shared_ptr_weak_type.
835 (enable_shared_from_this<T>::weak_from_this): Guard behind
836 __cpp_lib_enable_shared_from_this.
837 * include/bits/ranges_cmp.h: Switch to bits/version.h for
838 __cpp_lib_ranges.
839 * include/bits/ranges_algo.h: Switch to bits/version.h for
840 __cpp_lib_{shift,ranges_{contains,find_last,fold,iota}}.
841 * include/bits/range_access.h: Switch to bits/version.h for
842 __cpp_lib_nonmember_container_access
843 (size, empty, data): Guard behind
844 __cpp_lib_nonmember_container_access.
845 (ssize): Guard behind __cpp_lib_ssize.
846 * include/bits/ptr_traits.h: Switch to bits/version.h. for
847 __cpp_lib_{constexpr_memory,to_address}.
848 (to_address): Guard behind __cpp_lib_to_address.
849 * include/bits/node_handle.h: Switch to bits/version.h for
850 __cpp_lib_node_extract. Guard header behind that FTM.
851 * include/bits/move_only_function.h: Switch to bits/version.h for
852 __cpp_lib_move_only_function. Guard header behind that FTM.
853 * include/bits/move.h: Switch to bits/version.h for
854 __cpp_lib_addressof_constexpr.
855 * include/bits/ios_base.h: Switch to bits/version.h for
856 __cpp_lib_ios_noreplace.
857 (noreplace): Guard with __cpp_lib_ios_noreplace.
858 * include/bits/hashtable.h: Switch to bits/version.h for
859 __cpp_lib_generic_unordered_lookup.
860 (_M_equal_range_tr, _M_count_tr, _M_find_tr): Guard behind
861 __cpp_lib_generic_unordered_lookup.
862 * include/bits/forward_list.h: Switch to bits/version.h for
863 __cpp_lib_list_remove_return_type.
864 (__remove_return_type): Guard behind
865 __cpp_lib_list_remove_return_type.
866 * include/bits/erase_if.h: Switch to bits/version.h for
867 __cpp_lib_erase_if.
868 * include/bits/cow_string.h: Switch to bits/version.h for
869 __cpp_lib_constexpr_string.
870 * include/bits/chrono.h: Swtich to bits/version.h for
871 __cpp_lib_chrono{,_udls}.
872 (ceil): Guard behind __cpp_lib_chrono.
873 (operator""ns et al): Guard behind __cpp_lib_chrono_udls.
874 * include/bits/char_traits.h: Switch to bits/version.h for
875 __cpp_lib_constexpr_char_traits.
876 * include/bits/basic_string.h: Switch to bits/version.h for
877 __cpp_lib_{constexpr_string,string_{resize_and_overwrite,udls}}.
878 (resize_and_overwrite): Guard behind
879 __cpp_lib_string_resize_and_overwrite.
880 (operator""s): Guard behind __cpp_lib_string_udls.
881 * include/bits/atomic_wait.h: Switch to bits/version.h for
882 __cpp_lib_atomic_wait. Guard header behind that FTM.
883 * include/bits/atomic_base.h: Switch to bits/version.h for
884 __cpp_lib_atomic_value_initialization and
885 __cpp_lib_atomic_flag_test.
886 (atomic_flag::test): Guard behind __cpp_lib_atomic_flag_test,
887 rather than C++20.
888 * include/bits/allocator.h: Switch to bits/version.h for
889 __cpp_lib_incomplete_container_elements.
890 * include/bits/alloc_traits.h: Switch to using bits/version.h for
891 __cpp_lib_constexpr_dynamic_alloc and
892 __cpp_lib_allocator_traits_is_always_equal.
893 * include/bits/align.h: Switch to bits/version.h for defining
894 __cpp_lib_assume_aligned.
895 (assume_aligned): Guard with __cpp_lib_assume_aligned.
896 * include/bits/algorithmfwd.h: Switch to bits/version.h for
897 defining __cpp_lib_constexpr_algorithms.
898 * include/std/stacktrace: Switch to bits/version.h for
899 __cpp_lib_stacktrace. Guard header behind that FTM.
900 * testsuite/23_containers/array/tuple_interface/get_neg.cc:
901 Update line numbers.
902
903 2023-08-16 Arsen Arsenović <arsen@aarsen.me>
904
905 * include/Makefile.am (bits_freestanding): Add version.h.
906 (allcreated): Add version.h.
907 (${bits_srcdir}/version.h): New rule. Regenerates
908 version.h out of version.{def,tpl}.
909 * include/Makefile.in: Regenerate.
910 * include/bits/version.def: New file. Declares a list of
911 all feature test macros, their values and their preconditions.
912 * include/bits/version.tpl: New file. Turns version.def
913 into a sequence of #if blocks.
914 * include/bits/version.h: New file. Generated from
915 version.def.
916 * include/std/version: Replace with a __glibcxx_want_all define
917 and bits/version.h include.
918
919 2023-08-14 Paul Dreik <gccpatches@pauldreik.se>
920
921 PR libstdc++/110860
922 * include/std/format (__formatter_fp::format): Use frexp instead
923 of log10.
924
925 2023-08-12 Ken Matsui <kmatsui@gcc.gnu.org>
926
927 * include/std/type_traits (true_type): Use __bool_constant
928 instead.
929 (false_type): Likewise.
930 (bool_constant): Likewise.
931
932 2023-08-11 Jonathan Wakely <jwakely@redhat.com>
933
934 PR libstdc++/110990
935 * include/std/format (_Seq_sink::get): Only call _M_overflow if
936 its precondition is met.
937 (_Iter_sink::_M_finish): Likewise.
938 (_Iter_sink<C, ContigIter>::_M_overflow): Only switch to the
939 internal buffer after running out of space.
940 (_Iter_sink<C, ContigIter>::_M_finish): Do not use _M_overflow.
941 (_Counting_sink::count): Likewise.
942 * testsuite/std/format/functions/format_to_n.cc: Check cases
943 where the output fits into the buffer.
944
945 2023-08-11 Jonathan Wakely <jwakely@redhat.com>
946
947 PR libstdc++/104167
948 * include/bits/chrono_io.h (operator|=, operator|): Add noexcept
949 to _ChronoParts operators.
950 (from_stream, parse): Define new functions.
951 (__detail::_Parse, __detail::_Parser): New class templates.
952 * include/std/chrono (__cpp_lib_chrono): Define to 201907L for
953 C++20.
954 * include/std/version (__cpp_lib_chrono): Likewise.
955 * testsuite/20_util/duration/arithmetic/constexpr_c++17.cc:
956 Adjust expected value of feature test macro.
957 * testsuite/20_util/duration/io.cc: Test parsing.
958 * testsuite/std/time/clock/file/io.cc: Likewise.
959 * testsuite/std/time/clock/gps/io.cc: Likewise.
960 * testsuite/std/time/clock/system/io.cc: Likewise.
961 * testsuite/std/time/clock/tai/io.cc: Likewise.
962 * testsuite/std/time/clock/utc/io.cc: Likewise.
963 * testsuite/std/time/day/io.cc: Likewise.
964 * testsuite/std/time/month/io.cc: Likewise.
965 * testsuite/std/time/month_day/io.cc: Likewise.
966 * testsuite/std/time/weekday/io.cc: Likewise.
967 * testsuite/std/time/year/io.cc: Likewise.
968 * testsuite/std/time/year_month/io.cc: Likewise.
969 * testsuite/std/time/year_month_day/io.cc: Likewise.
970 * testsuite/std/time/syn_c++20.cc: Check value of macro and for
971 the existence of parse and from_stream in namespace chrono.
972 * testsuite/std/time/clock/local/io.cc: New test.
973 * testsuite/std/time/parse.cc: New test.
974
975 2023-08-11 Jonathan Wakely <jwakely@redhat.com>
976
977 PR libstdc++/110860
978 * include/std/format (__formatter_fp::format): Do not call log10
979 with zero values.
980
981 2023-08-11 Jonathan Wakely <jwakely@redhat.com>
982
983 * python/libstdcxx/v6/printers.py (StdChronoCalendarPrinter):
984 Check for out-of-range month an weekday indices.
985 * testsuite/libstdc++-prettyprinters/chrono.cc: Check invalid
986 month and weekday values.
987
988 2023-08-11 Jonathan Wakely <jwakely@redhat.com>
989
990 * include/bits/stl_iterator.h (__clamped_iter_cat_t): Remove.
991
992 2023-08-10 Jonathan Wakely <jwakely@redhat.com>
993
994 PR libstdc++/110974
995 * include/std/format (_Spec::_S_parse_width_or_precision): Check
996 for empty range before dereferencing iterator.
997 * testsuite/std/format/string.cc: Check for expected exception.
998 Fix expected exception message in test_pr110862() and actually
999 call it.
1000
1001 2023-08-10 Jonathan Wakely <jwakely@redhat.com>
1002
1003 PR libstdc++/110968
1004 * include/std/format (__formatter_fp::format): Check return
1005 value of _M_localize.
1006 * testsuite/std/format/functions/format.cc: Check classic
1007 locale.
1008
1009 2023-08-10 Jonathan Wakely <jwakely@redhat.com>
1010
1011 PR libstdc++/110970
1012 * include/bits/stl_iterator.h (__detail::__move_iter_cat): Use
1013 __iter_category_t.
1014 (iterator_traits<common_iterator<I, S>>::_S_iter_cat): Likewise.
1015 (__detail::__basic_const_iterator_iter_cat): Likewise.
1016 * include/bits/stl_iterator_base_types.h (__iterator_category_t):
1017 Rename to __iter_category_t.
1018
1019 2023-08-09 Jonathan Wakely <jwakely@redhat.com>
1020
1021 * include/bits/chrono.h (duration_cast): Do not use braces
1022 around statements for C++11 constexpr rules.
1023 * include/bits/stl_algobase.h (__lg): Rewrite as a single
1024 statement for C++11 constexpr rules.
1025 * include/experimental/bits/fs_path.h (path::string): Use
1026 _GLIBCXX17_CONSTEXPR not _GLIBCXX_CONSTEXPR for 'if constexpr'.
1027 * include/std/charconv (__to_chars_8): Initialize variable for
1028 C++17 constexpr rules.
1029
1030 2023-08-09 Jonathan Wakely <jwakely@redhat.com>
1031
1032 * include/bits/list.tcc (list::sort(Cmp)): Fix -Wsign-compare
1033 warning for loop condition.
1034
1035 2023-08-09 Jonathan Wakely <jwakely@redhat.com>
1036
1037 * include/std/complex: Add diagnostic pragma for clang.
1038
1039 2023-08-09 Jonathan Wakely <jwakely@redhat.com>
1040
1041 * include/bits/shared_ptr_atomic.h (atomic): Change class-head
1042 to struct.
1043 * include/bits/stl_tree.h (_Rb_tree_merge_helper): Change
1044 class-head to struct in friend declaration.
1045 * include/std/chrono (tzdb_list::_Node): Likewise.
1046 * include/std/future (_Task_state_base, _Task_state): Likewise.
1047 * include/std/scoped_allocator (__inner_type_impl): Likewise.
1048 * include/std/valarray (_BinClos, _SClos, _GClos, _IClos)
1049 (_ValFunClos, _RefFunClos): Change class-head to struct.
1050
1051 2023-08-09 Jonathan Wakely <jwakely@redhat.com>
1052
1053 * include/bits/alloc_traits.h (allocate): Add [[maybe_unused]]
1054 attribute.
1055 * include/bits/regex_executor.tcc: Remove name of unused
1056 parameter.
1057 * include/bits/shared_ptr_atomic.h (atomic_is_lock_free):
1058 Likewise.
1059 * include/bits/stl_uninitialized.h: Likewise.
1060 * include/bits/streambuf_iterator.h (operator==): Likewise.
1061 * include/bits/uses_allocator.h: Likewise.
1062 * include/c_global/cmath (isfinite, isinf, isnan): Likewise.
1063 * include/std/chrono (zoned_time): Likewise.
1064 * include/std/future (__future_base::_S_allocate_result):
1065 Likewise.
1066 (packaged_task): Likewise.
1067 * include/std/optional (_Optional_payload_base): Likewise.
1068 * include/std/scoped_allocator (__inner_type_impl): Likewise.
1069 * include/std/tuple (_Tuple_impl): Likewise.
1070
1071 2023-08-09 Jonathan Wakely <jwakely@redhat.com>
1072
1073 * include/bits/new_allocator.h (__new_allocator): Define copy
1074 assignment operator as defaulted.
1075 * include/std/complex (complex<float>, complex<double>)
1076 (complex<long double>): Define copy constructor as defaulted.
1077
1078 2023-08-09 Jonathan Wakely <jwakely@redhat.com>
1079
1080 * include/std/format: Fix some warnings.
1081 (__format::__write(Ctx&, basic_string_view<CharT>)): Remove
1082 unused function template.
1083
1084 2023-08-07 Jonathan Wakely <jwakely@redhat.com>
1085
1086 PR libstdc++/110860
1087 * include/std/format (__formatter_fp::format): Do not use
1088 __builtin_abs and __builtin_log10 with arbitrary floating-point
1089 types.
1090
1091 2023-08-07 Jonathan Wakely <jwakely@redhat.com>
1092
1093 PR libstdc++/110917
1094 * include/std/format (__format::_Iter_sink<CharT, OutIter>):
1095 Constrain partial specialization for contiguous iterators to
1096 require the value type to be CharT.
1097 * testsuite/std/format/functions/format_to.cc: New test.
1098
1099 2023-08-07 Jonathan Wakely <jwakely@redhat.com>
1100
1101 PR libstdc++/110862
1102 * include/std/format (_Scanner::_M_on_replacement_field):
1103 Check for expected '}' before incrementing iterator.
1104 * testsuite/std/format/string.cc: Check "{0:{0}" format string.
1105
1106 2023-08-07 Nick Alcock <nick.alcock@oracle.com>
1107
1108 * configure: Regenerate.
1109
1110 2023-08-07 Alan Modra <amodra@gmail.com>
1111
1112 * configure: Regenerate.
1113
1114 2023-08-07 Alexander von Gluck IV <kallisti5@unixzen.com>
1115
1116 * configure: Regenerate.
1117
1118 2023-08-07 Nick Alcock <nick.alcock@oracle.com>
1119
1120 * configure: Regenerate.
1121
1122 2023-08-07 Nick Alcock <nick.alcock@oracle.com>
1123
1124 * configure: Regenerate.
1125
1126 2023-08-07 H.J. Lu <hjl.tools@gmail.com>
1127
1128 * configure: Regenerate.
1129
1130 2023-08-07 H.J. Lu <hjl.tools@gmail.com>
1131
1132 * configure: Regenerate.
1133
1134 2023-08-06 François Dumont <fdumont@gcc.gnu.org>
1135
1136 * config/abi/pre/gnu-versioned-namespace.ver: Add __cxa_call_terminate
1137 symbol export.
1138
1139 2023-07-30 François Dumont <fdumont@gcc.gnu.org>
1140
1141 * src/c++11/compatibility-ldbl-facets-aliases.h: Replace #define with
1142 proper #error.
1143 * src/c++11/locale-inst-monetary.h: Likewise.
1144 * src/c++11/locale-inst-numeric.h: Likewise.
1145
1146 2023-07-27 Jonathan Wakely <jwakely@redhat.com>
1147
1148 PR libstdc++/108046
1149 * include/std/format (__formatter_fp::format): Ensure __expc is
1150 always set for all presentation types. Set __z correctly for
1151 zero precision.
1152 * testsuite/std/format/functions/format.cc: Check problem cases.
1153
1154 2023-07-26 Jonathan Wakely <jwakely@redhat.com>
1155
1156 PR libstdc++/110807
1157 * testsuite/23_containers/vector/bool/110807.cc: Require c++11.
1158
1159 2023-07-26 Jonathan Wakely <jwakely@redhat.com>
1160
1161 PR libstdc++/110807
1162 * include/bits/stl_bvector.h (vector(const vector&)): Access
1163 iterators before allocating.
1164 * include/bits/vector.tcc (vector<bool>::_M_insert_range):
1165 Likewise.
1166 * testsuite/23_containers/vector/bool/110807.cc: New test.
1167
1168 2023-07-26 Jonathan Wakely <jwakely@redhat.com>
1169
1170 * include/bits/algorithmfwd.h (random_shuffle): Add deprecated
1171 attribute.
1172 * include/bits/stl_algo.h (random_shuffle): Correct comments.
1173 * testsuite/25_algorithms/random_shuffle/1.cc: Disable
1174 deprecated warnings.
1175 * testsuite/25_algorithms/random_shuffle/59603.cc: Likewise.
1176 * testsuite/25_algorithms/random_shuffle/moveable.cc: Likewise.
1177 * testsuite/25_algorithms/random_shuffle/deprecated.cc: New
1178 test.
1179
1180 2023-07-26 Nathaniel Shead <nathanieloshead@gmail.com>
1181
1182 * testsuite/25_algorithms/equal/constexpr_neg.cc: Update diagnostic
1183 locations.
1184 * testsuite/26_numerics/gcd/105844.cc: Likewise.
1185 * testsuite/26_numerics/lcm/105844.cc: Likewise.
1186
1187 2023-07-24 Deev Patel <pateldeev@nevada.unr.edu>
1188
1189 * include/std/format (_Formatting_scanner::_M_on_chars): Add
1190 missing constexpr specifier.
1191 (_Formatting_scanner::_M_format_arg): Likewise.
1192
1193 2023-07-24 Jonathan Wakely <jwakely@redhat.com>
1194
1195 PR libstdc++/110653
1196 * include/bits/basic_string.h [!HAVE_STOF] (stof): Do not
1197 throw an exception for zero result.
1198 [HAVE_BROKEN_STRTOLD] (stold): Do not use strtold.
1199
1200 2023-07-19 Jonathan Wakely <jwakely@redhat.com>
1201
1202 PR libstdc++/110077
1203 * src/c++17/floating_from_chars.cc (from_chars): Only define
1204 _Float128 overload when using __strfromf128.
1205
1206 2023-07-19 Jonathan Wakely <jwakely@redhat.com>
1207
1208 PR libstdc++/110593
1209 * include/bits/chrono.h (duration): Improve static assert
1210 messages.
1211 (__is_ratio): Move to ...
1212 * include/std/ratio (__is_ratio): ... here.
1213 (__is_ratio_v): New variable template and partial
1214 specialization.
1215 (__are_both_ratios): New function template.
1216 (__ratio_multiply, ratio_equal, ratio_less, __ratio_add):
1217 Add static assertion.
1218 * testsuite/20_util/ratio/requirements/type_constraints.cc:
1219 New test.
1220 * testsuite/20_util/duration/requirements/typedefs_neg1.cc:
1221 Adjust expected error.
1222 * testsuite/20_util/duration/requirements/typedefs_neg2.cc:
1223 Likewise.
1224
1225 2023-07-19 Jonathan Wakely <jwakely@redhat.com>
1226
1227 * include/bits/chrono_io.h (__formatter_chrono::_M_format):
1228 Do not set __is_neg for hh_mm_ss before calling
1229 _M_format_to_ostream. Change __print_sign lambda to only check
1230 __is_neg for durations and hh_mm_ss types.
1231 (__formatter_chrono::_M_format_to_ostream): Only check __is_neg
1232 for duration types.
1233 * testsuite/std/time/hh_mm_ss/io.cc: Check negative values.
1234
1235 2023-07-19 Jonathan Wakely <jwakely@redhat.com>
1236
1237 PR libstdc++/110719
1238 * include/bits/chrono_io.h (__formatter_chrono::_S_floor_seconds):
1239 Handle duration and hh_mm_ss.
1240 * testsuite/20_util/duration/io.cc: Check locale-specific
1241 formats.
1242 * testsuite/std/time/hh_mm_ss/io.cc: Likewise.
1243
1244 2023-07-19 Jonathan Wakely <jwakely@redhat.com>
1245
1246 * include/std/format (__write_padded): Initialize first element
1247 of array to avoid a -Wmaybe-uninitialized warning.
1248
1249 2023-07-19 Jonathan Wakely <jwakely@redhat.com>
1250
1251 PR libstdc++/110719
1252 * include/bits/chrono_io.h (__formatter_chrono::_M_parse): Fix
1253 allowed modifiers for %z and %Z. Fix -Wparentheses and
1254 -Wnarrowing warnings.
1255 (__formatter_chrono::_M_format): Call new functions for %d, %e,
1256 %H, %I, %m and %M.
1257 (__formatter_chrono::_M_c): Use _S_floor_seconds to remove
1258 subsecond precision.
1259 (__formatter_chrono::_M_C_y_Y): Use _M_locale_fmt to handle
1260 modifiers.
1261 (__formatter_chrono::_M_e): Replace with _M_d_e and use
1262 _M_locale_fmt.
1263 (__formatter_chrono::_M_I): Replace with _M_H_I and use
1264 _M_locale_fmt.
1265 (__formatter_chrono::_M_m): New function.
1266 (__formatter_chrono::_M_M): New function.
1267 (__formatter_chrono::_M_r): Use _M_locale_fmt.
1268 (__formatter_chrono::_M_S): Likewise.
1269 (__formatter_chrono::_M_u_w): Likewise.
1270 (__formatter_chrono::_M_U_V_W): Likewise.
1271 (__formatter_chrono::_M_X): Use _S_floor_seconds.
1272 (__formatter_chrono::_M_Z): Fix untested branch for wchar_t.
1273 (__formatter_chrono::_S_altnum): Remove function.
1274 (__formatter_chrono::_S_dd_zero_fill): Remove function.
1275 (__formatter_chrono::_S_floor_seconds): New function.
1276 (__formatter_chrono::_M_locale_fmt): New function.
1277 * testsuite/std/time/clock/system/io.cc: Adjust expected output
1278 for locale-specific formats and check modified formats.
1279 * testsuite/std/time/clock/utc/io.cc: Likewise.
1280 * testsuite/std/time/zoned_time/io.cc: New test.
1281
1282 2023-07-19 Jonathan Wakely <jwakely@redhat.com>
1283
1284 PR libstdc++/110708
1285 * include/bits/chrono_io.h (__formatter_chrono::_M_parse): Only
1286 allow a single modifier.
1287 * testsuite/std/time/format.cc: Check multiple modifiers.
1288
1289 2023-07-19 Jonathan Wakely <jwakely@redhat.com>
1290
1291 PR libstdc++/110653
1292 * testsuite/21_strings/basic_string/numeric_conversions/char/stod.cc:
1293 Remove dg-require-string-conversions.
1294 * testsuite/21_strings/basic_string/numeric_conversions/char/stof.cc:
1295 Likewise.
1296 * testsuite/21_strings/basic_string/numeric_conversions/char/stoi.cc:
1297 Likewise.
1298 * testsuite/21_strings/basic_string/numeric_conversions/char/stol.cc:
1299 Likewise.
1300 * testsuite/21_strings/basic_string/numeric_conversions/char/stoul.cc:
1301 Likewise.
1302
1303 2023-07-19 Jonathan Wakely <jwakely@redhat.com>
1304
1305 PR libstdc++/110653
1306 * include/bits/basic_string.h [!_GLIBCXX_HAVE_STRTOF] (stof):
1307 Define in terms of std::stod.
1308
1309 2023-07-19 Jonathan Wakely <jwakely@redhat.com>
1310
1311 PR libstdc++/110653
1312 * include/bits/basic_string.h [_GLIBCXX_HAVE_STRTOF] (stof):
1313 Define.
1314 [_GLIBCXX_HAVE_STRTOLD] (stold): Define.
1315 * include/c_global/cstdlib [_GLIBCXX_HAVE_STRTOF] (strtof):
1316 Declare in namespace std.
1317 [_GLIBCXX_HAVE_STRTOLD] (strtold): Likewise.
1318
1319 2023-07-13 Jonathan Wakely <jwakely@redhat.com>
1320
1321 PR libstdc++/110653
1322 * include/bits/basic_string.h (stoi, stol, stoul, stod): Do not
1323 depend on _GLIBCXX_USE_C99_STDLIB.
1324 [__LONG_WIDTH__ == __LONG_LONG_WIDTH__] (stoll, stoull): Define
1325 in terms of stol and stoul respectively.
1326 [__DBL_MANT_DIG__ == __LDBL_MANT_DIG__] (stold): Define in terms
1327 of stod.
1328
1329 2023-07-12 Jonathan Wakely <jwakely@redhat.com>
1330
1331 PR libstdc++/95048
1332 * testsuite/27_io/filesystem/path/construct/95048.cc: Check
1333 conversions to wide strings.
1334 * testsuite/experimental/filesystem/path/construct/95048.cc:
1335 Likewise.
1336
1337 2023-07-12 Jonathan Wakely <jwakely@redhat.com>
1338
1339 * config/io/basic_file_stdio.cc: Define LFS macros.
1340 (__basic_file<char>::open): Use fopen unconditionally.
1341 (get_file_offset): Use lseek unconditionally.
1342 (__basic_file<char>::seekoff): Likewise.
1343 (__basic_file<char>::showmanyc): Use fstat unconditionally.
1344
1345 2023-07-12 Jonathan Wakely <jwakely@redhat.com>
1346
1347 PR libstdc++/110574
1348 * acinclude.m4 (GLIBCXX_CHECK_LFS): Check for fseeko and ftello
1349 and define _GLIBCXX_USE_FSEEKO_FTELLO.
1350 * config.h.in: Regenerate.
1351 * configure: Regenerate.
1352 * config/io/basic_file_stdio.cc (xwrite) [_GLIBCXX_USE_STDIO_PURE]:
1353 Check for fwrite error correctly.
1354 (__basic_file<char>::xsgetn) [_GLIBCXX_USE_STDIO_PURE]: Check for
1355 fread error correctly.
1356 (get_file_offset): New function.
1357 (__basic_file<char>::seekoff) [_GLIBCXX_USE_STDIO_PURE]: Use
1358 fseeko if available. Use get_file_offset instead of return value
1359 of fseek.
1360 (__basic_file<char>::showmanyc): Use get_file_offset.
1361
1362 2023-07-12 Ken Matsui <kmatsui@gcc.gnu.org>
1363
1364 * include/std/type_traits (__make_unsigned_selector): Use
1365 __is_enum built-in trait.
1366 (__make_signed_selector): Likewise.
1367 (__underlying_type_impl): Likewise.
1368
1369 2023-07-06 Tianqiang Shuai <1101282468@qq.com>
1370
1371 * config/io/basic_file_stdio.cc (xwrite) [USE_STDIO_PURE]: Fix
1372 first argument.
1373
1374 2023-07-06 Jonathan Wakely <jwakely@redhat.com>
1375
1376 PR libstdc++/110574
1377 * doc/xml/manual/configure.xml: Describe stdio_pure argument to
1378 --enable-cstdio.
1379 * doc/html/manual/configure.html: Regenerate.
1380
1381 2023-07-05 Thomas Rodgers <trodgers@redhat.com>
1382
1383 * testsuite/25_algorithms/pstl/alg_sorting/set.cc: Delete
1384 file.
1385 * testsuite/25_algorithms/pstl/alg_sorting/set_difference.cc:
1386 New file.
1387 * testsuite/25_algorithms/pstl/alg_sorting/set_intersection.cc:
1388 Likewise.
1389 * testsuite/25_algorithms/pstl/alg_sorting/set_symmetric_difference.cc:
1390 Likewise.
1391 * testsuite/25_algorithms/pstl/alg_sorting/set_union.cc:
1392 Likewise.
1393 * testsuite/25_algorithms/pstl/alg_sorting/set_util.h:
1394 Likewise.
1395
1396 2023-07-05 Jonathan Wakely <jwakely@redhat.com>
1397
1398 * testsuite/23_containers/forward_list/debug/iterator1_neg.cc:
1399 Skip as UNSUPPORTED for C++98 mode.
1400 * testsuite/23_containers/forward_list/debug/iterator3_neg.cc:
1401 Likewise.
1402
1403 2023-07-05 Jonathan Wakely <jwakely@redhat.com>
1404
1405 PR libstdc++/110542
1406 * include/bits/stl_uninitialized.h (__uninitialized_default_n):
1407 Do not use std::fill_n during constant evaluation.
1408
1409 2023-07-05 Jonathan Wakely <jwakely@redhat.com>
1410
1411 * include/bits/vector.tcc (_M_default_append): Replace try-block
1412 with RAII types.
1413
1414 2023-07-05 Jonathan Wakely <jwakely@redhat.com>
1415
1416 * include/bits/iterator_concepts.h (projected): Add typename.
1417
1418 2023-07-03 Jonathan Wakely <jwakely@redhat.com>
1419
1420 * testsuite/27_io/headers/iosfwd/synopsis.cc: Make wsyncbuf and
1421 wosyncstream depend on _GLIBCXX_USE_CXX11_ABI.
1422
1423 2023-07-03 Jonathan Wakely <jwakely@redhat.com>
1424
1425 * include/pstl/pstl_config.h (_PSTL_PRAGMA_SIMD_SCAN,
1426 _PSTL_PRAGMA_SIMD_INCLUSIVE_SCAN, _PSTL_PRAGMA_SIMD_EXCLUSIVE_SCAN):
1427 Define to OpenMP 5.0 pragmas even for GCC 10.0+.
1428 (_PSTL_UDS_PRESENT): Define to 1 for GCC 10.0+.
1429
1430 2023-07-03 Jonathan Wakely <jwakely@redhat.com>
1431
1432 * include/bits/alloc_traits.h (_Destroy): Qualify call.
1433 * include/bits/stl_construct.h (_Destroy, _Destroy_n): Likewise.
1434 * testsuite/23_containers/vector/cons/destroy-adl.cc: New test.
1435
1436 2023-07-03 Iain Sandoe <iain@sandoe.co.uk>
1437
1438 * testsuite/lib/libstdc++.exp: Remove additional flag handled
1439 by Darwin specs.
1440
1441 2023-06-30 Jonathan Wakely <jwakely@redhat.com>
1442
1443 PR libstdc++/110432
1444 * acinclude.m4 (GLIBCXX_CHECK_INIT_PRIORITY): New.
1445 * config.h.in: Regenerate.
1446 * configure: Regenerate.
1447 * configure.ac: Use GLIBCXX_CHECK_INIT_PRIORITY.
1448 * include/std/iostream: Use new autoconf macro as well as
1449 __has_attribute.
1450 * src/c++98/ios_base_init.h: Use new autoconf macro instead of
1451 __has_attribute.
1452
1453 2023-06-30 Jonathan Wakely <jwakely@redhat.com>
1454
1455 * src/c++11/random.cc (random_device::_M_init): Add maybe_unused
1456 attribute.
1457
1458 2023-06-30 Jonathan Wakely <jwakely@redhat.com>
1459
1460 PR libstdc++/105081
1461 * src/c++11/random.cc (random_device::_M_init): Throw
1462 std::system_error when the requested device is a valid token but
1463 not available at runtime.
1464
1465 2023-06-30 Hans-Peter Nilsson <hp@axis.com>
1466
1467 PR libstdc++/108672
1468 * include/pstl/unseq_backend_simd.h (__simd_or): Re-apply using
1469 __INT32_TYPE__ instead of int32_t.
1470
1471 2023-06-29 Jonathan Wakely <jwakely@redhat.com>
1472
1473 * src/c++20/tzdb.cc (USE_ATOMIC_SHARED_PTR): Define consistently
1474 with USE_ATOMIC_LIST_HEAD.
1475 (list_mutex): Replace global object with function. Use local
1476 static object when std::mutex constructor isn't constexpr.
1477
1478 2023-06-29 Jonathan Wakely <jwakely@redhat.com>
1479
1480 PR libstdc++/110462
1481 * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Check that
1482 copy_file_range can be called with loff_t* arguments.
1483 * configure: Regenerate.
1484 * src/filesystem/ops-common.h (copy_file_copy_file_range):
1485 Use loff_t for offsets.
1486
1487 2023-06-29 Tom Tromey <tromey@adacore.com>
1488
1489 * testsuite/lib/gdb-test.exp (gdb-test): Relax type-printer
1490 regexp.
1491
1492 2023-06-28 Jan Hubicka <jh@suse.cz>
1493
1494 PR middle-end/109849
1495 * include/bits/c++config (std::__terminate): Mark cold.
1496 * include/bits/functexcept.h: Mark everything as cold.
1497 * libsupc++/exception: Mark terminate and unexpected as cold.
1498
1499 2023-06-26 Thomas Rodgers <trodgers@redhat.com>
1500
1501 * include/pstl/algorithm_fwd.h: Synchronize with upstream.
1502 * include/pstl/algorithm_impl.h: Likewise.
1503 * include/pstl/execution_defs.h: Likewise.
1504 * include/pstl/execution_impl.h: Likewise.
1505 * include/pstl/glue_algorithm_impl.h: Likewise.
1506 * include/pstl/glue_execution_defs.h: Likewise.
1507 * include/pstl/glue_memory_impl.h: Likewise.
1508 * include/pstl/glue_numeric_impl.h: Likewise.
1509 * include/pstl/memory_impl.h: Likewise.
1510 * include/pstl/numeric_fwd.h: Likewise.
1511 * include/pstl/numeric_impl.h: Likewise.
1512 * include/pstl/parallel_backend.h: Likewise.
1513 * include/pstl/parallel_backend_serial.h: Likewise.
1514 * include/pstl/parallel_backend_tbb.h: Likewise.
1515 * include/pstl/parallel_impl.h: Likewise.
1516 * include/pstl/pstl_config.h: Likewise.
1517 * include/pstl/unseq_backend_simd.h: Likewise.
1518 * include/pstl/utils.h: Likewise.
1519 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_construct.cc:
1520 Likewise.
1521 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_copy_move.cc:
1522 Likewise.
1523 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_fill_destroy.cc:
1524 Likewise.
1525 * testsuite/25_algorithms/pstl/alg_merge/inplace_merge.cc:
1526 Likewise.
1527 * testsuite/25_algorithms/pstl/alg_merge/merge.cc: Likewise.
1528 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_if.cc:
1529 Likewise.
1530 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_move.cc:
1531 Likewise.
1532 * testsuite/25_algorithms/pstl/alg_modifying_operations/fill.cc:
1533 Likewise.
1534 * testsuite/25_algorithms/pstl/alg_modifying_operations/generate.cc:
1535 Likewise.
1536 * testsuite/25_algorithms/pstl/alg_modifying_operations/is_partitioned.cc:
1537 Likewise.
1538 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition.cc:
1539 Likewise.
1540 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition_copy.cc:
1541 Likewise.
1542 * testsuite/25_algorithms/pstl/alg_modifying_operations/remove.cc:
1543 Likewise.
1544 * testsuite/25_algorithms/pstl/alg_modifying_operations/remove_copy.cc:
1545 Likewise.
1546 * testsuite/25_algorithms/pstl/alg_modifying_operations/replace.cc:
1547 Likewise.
1548 * testsuite/25_algorithms/pstl/alg_modifying_operations/replace_copy.cc:
1549 Likewise.
1550 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate.cc:
1551 Likewise.
1552 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate_copy.cc:
1553 Likewise.
1554 * testsuite/25_algorithms/pstl/alg_modifying_operations/swap_ranges.cc:
1555 Likewise.
1556 * testsuite/25_algorithms/pstl/alg_modifying_operations/transform_binary.cc:
1557 Likewise.
1558 * testsuite/25_algorithms/pstl/alg_modifying_operations/transform_unary.cc:
1559 Likewise.
1560 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique.cc:
1561 Likewise.
1562 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique_copy_equal.cc:
1563 Likewise.
1564 * testsuite/25_algorithms/pstl/alg_nonmodifying/adjacent_find.cc:
1565 Likewise.
1566 * testsuite/25_algorithms/pstl/alg_nonmodifying/all_of.cc:
1567 Likewise.
1568 * testsuite/25_algorithms/pstl/alg_nonmodifying/any_of.cc:
1569 Likewise.
1570 * testsuite/25_algorithms/pstl/alg_nonmodifying/count.cc:
1571 Likewise.
1572 * testsuite/25_algorithms/pstl/alg_nonmodifying/equal.cc:
1573 Likewise.
1574 * testsuite/25_algorithms/pstl/alg_nonmodifying/find.cc:
1575 Likewise.
1576 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_end.cc:
1577 Likewise.
1578 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_first_of.cc:
1579 Likewise.
1580 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_if.cc:
1581 Likewise.
1582 * testsuite/25_algorithms/pstl/alg_nonmodifying/for_each.cc:
1583 Likewise.
1584 * testsuite/25_algorithms/pstl/alg_nonmodifying/mismatch.cc:
1585 Likewise.
1586 * testsuite/25_algorithms/pstl/alg_nonmodifying/none_of.cc:
1587 Likewise.
1588 * testsuite/25_algorithms/pstl/alg_nonmodifying/nth_element.cc:
1589 Likewise.
1590 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse.cc:
1591 Likewise.
1592 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse_copy.cc:
1593 Likewise.
1594 * testsuite/25_algorithms/pstl/alg_nonmodifying/search_n.cc:
1595 Likewise.
1596 * testsuite/25_algorithms/pstl/alg_sorting/includes.cc:
1597 Likewise.
1598 * testsuite/25_algorithms/pstl/alg_sorting/is_heap.cc:
1599 Likewise.
1600 * testsuite/25_algorithms/pstl/alg_sorting/is_sorted.cc:
1601 Likewise.
1602 * testsuite/25_algorithms/pstl/alg_sorting/lexicographical_compare.cc:
1603 Likewise.
1604 * testsuite/25_algorithms/pstl/alg_sorting/minmax_element.cc:
1605 Likewise.
1606 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort.cc:
1607 Likewise.
1608 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort_copy.cc:
1609 Likewise.
1610 * testsuite/25_algorithms/pstl/alg_sorting/set.cc:
1611 Likewise.
1612 * testsuite/25_algorithms/pstl/alg_sorting/sort.cc:
1613 Likewise.
1614 * testsuite/26_numerics/pstl/numeric_ops/adjacent_difference.cc:
1615 Likewise.
1616 * testsuite/26_numerics/pstl/numeric_ops/reduce.cc:
1617 Likewise.
1618 * testsuite/26_numerics/pstl/numeric_ops/scan.cc:
1619 Likewise.
1620 * testsuite/26_numerics/pstl/numeric_ops/transform_reduce.cc:
1621 Likewise.
1622 * testsuite/26_numerics/pstl/numeric_ops/transform_scan.cc:
1623 Likewise.
1624 * testsuite/util/pstl/test_utils.h:
1625 Likewise.
1626
1627 2023-06-26 Jonathan Wakely <jwakely@redhat.com>
1628
1629 PR libstdc++/110239
1630 * include/std/format (__format::__parse_integer): Fix buffer
1631 overflow for wide chars.
1632 (formatter<const void*, C>::format): Cast to uintptr_t instead
1633 of uint64_t.
1634 * testsuite/std/format/string.cc: Test too-large widths.
1635
1636 2023-06-26 Jonathan Wakely <jwakely@redhat.com>
1637
1638 * include/bits/iterator_concepts.h (projected): Replace class
1639 template with alias template denoting an ADL-proofed helper.
1640 (incremental_traits<projected<Iter, Proj>>): Remove.
1641 * testsuite/24_iterators/indirect_callable/projected-adl.cc:
1642 New test.
1643
1644 2023-06-26 Jonathan Wakely <jwakely@redhat.com>
1645
1646 * include/debug/helper_functions.h (__get_distance)
1647 (__check_singular, __valid_range_aux, __valid_range): Qualify
1648 calls to disable ADL.
1649 (__check_singular_aux(const _Safe_iterator_base*)): Declare
1650 overload that was previously found via ADL.
1651
1652 2023-06-23 Jonathan Wakely <jwakely@redhat.com>
1653
1654 * include/bits/vector.tcc (_M_realloc_insert): Replace try-block
1655 with RAII types.
1656
1657 2023-06-20 Jonathan Wakely <jwakely@redhat.com>
1658
1659 * include/std/array (to_array(T(&)[N])): Remove redundant
1660 condition.
1661 (to_array(T(&&)[N])): Remove redundant std::move.
1662
1663 2023-06-16 Alexandre Oliva <oliva@adacore.com>
1664
1665 * testsuite/20_util/from_chars/4.cc: Skip long double on
1666 aarch64-rtems.
1667
1668 2023-06-16 Joel Brobecker <brobecker@adacore.com>
1669
1670 * configure.ac ["x${with_newlib}" = "xyes"]: Define
1671 HAVE_HYPOTF. Add compile-checks for various long double
1672 math functions as well.
1673 * configure: Regenerate.
1674
1675 2023-06-14 Jonny Grant <jg@jguk.org>
1676
1677 * doc/xml/manual/extensions.xml: Remove demangle exception
1678 description and include.
1679 * doc/html/manual/ext_demangling.html: Regenerate.
1680
1681 2023-06-10 Hans-Peter Nilsson <hp@axis.com>
1682
1683 * testsuite/27_io/basic_istream/ignore/wchar_t/94749.cc (main)
1684 [! SIMULATOR_TEST]: Also exclude running test05.
1685 * testsuite/27_io/basic_istream/ignore/char/94749.cc: Ditto.
1686
1687 2023-06-09 Ken Matsui <kmatsui@cs.washington.edu>
1688
1689 * include/std/type_traits: Use using instead of typedef
1690
1691 2023-06-09 Jonathan Wakely <jwakely@redhat.com>
1692
1693 PR libstdc++/110077
1694 * src/c++17/floating_from_chars.cc (from_chars) <_Float128>:
1695 Only define if _Float128 and long double have different
1696 representations.
1697
1698 2023-06-09 Jonathan Wakely <jwakely@redhat.com>
1699
1700 PR libstdc++/100285
1701 * include/experimental/internet [IPPROTO_TCP || IPPROTO_UDP]
1702 (basic_endpoint, basic_resolver_entry, resolver_base)
1703 (basic_resolver_results, basic_resolver): Only define if the tcp
1704 or udp protocols will be defined.
1705
1706 2023-06-09 Jonathan Wakely <jwakely@redhat.com>
1707
1708 * acinclude.m4 (libtool_VERSION): Update to 6.0.33.
1709 * configure: Regenerate.
1710 * doc/xml/manual/abi.xml: Add libstdc++.so.6.0.33.
1711 * doc/html/manual/abi.html: Regenerate.
1712
1713 2023-06-09 Jonathan Wakely <jwakely@redhat.com>
1714
1715 PR libstdc++/110149
1716 * include/std/format (formatter<const void*, charT>::parse):
1717 Only alow 0 and P for C++26 and non-strict modes.
1718 (formatter<const void*, charT>::format): Use toupper for P
1719 type, and insert zero-fill characters for 0 option.
1720 * testsuite/std/format/functions/format.cc: Check pointer
1721 formatting. Only check P2510R3 extensions conditionally.
1722 * testsuite/std/format/parse_ctx.cc: Only check P2510R3
1723 extensions conditionally.
1724
1725 2023-06-09 Jonathan Wakely <jwakely@redhat.com>
1726
1727 PR libstdc++/110167
1728 * include/std/array (to_array): Initialize arrays of trivial
1729 types using memcpy. For non-trivial types, use lambda
1730 expressions instead of a separate helper function.
1731 (__to_array): Remove.
1732 * testsuite/23_containers/array/creation/110167.cc: New test.
1733
1734 2023-06-09 Jonathan Wakely <jwakely@redhat.com>
1735
1736 * testsuite/23_containers/deque/modifiers/emplace/52799.cc:
1737 Removed.
1738 * testsuite/23_containers/deque/modifiers/emplace/const_iterator.cc:
1739 Removed.
1740 * testsuite/23_containers/list/modifiers/emplace/52799.cc:
1741 Removed.
1742 * testsuite/23_containers/list/modifiers/emplace/const_iterator.cc:
1743 Removed.
1744 * testsuite/23_containers/vector/modifiers/emplace/52799.cc:
1745 Removed.
1746 * testsuite/23_containers/vector/modifiers/emplace/const_iterator.cc:
1747 Removed.
1748 * testsuite/23_containers/deque/modifiers/emplace/1.cc: New
1749 test.
1750 * testsuite/23_containers/list/modifiers/emplace/1.cc: New
1751 test.
1752 * testsuite/23_containers/vector/modifiers/emplace/1.cc: New
1753 test.
1754
1755 2023-06-07 Jakub Jelinek <jakub@redhat.com>
1756
1757 PR libstdc++/110145
1758 * testsuite/20_util/to_chars/double.cc: Include <cfloat>.
1759 (double_to_chars_test_cases,
1760 double_scientific_precision_to_chars_test_cases_2,
1761 double_fixed_precision_to_chars_test_cases_2): #if out 1e126, 4.91e-6
1762 and 5.547e-6 tests if FLT_EVAL_METHOD is negative or larger than 1.
1763 Add unconditional tests with corresponding double constants
1764 0x1.7a2ecc414a03fp+418, 0x1.4981285e98e79p-18 and
1765 0x1.7440bbff418b9p-18.
1766
1767 2023-06-07 Jonathan Wakely <jwakely@redhat.com>
1768
1769 * testsuite/util/testsuite_abi.cc (check_version): Re-add
1770 CXXABI_1.3.14.
1771
1772 2023-06-07 Jonathan Wakely <jwakely@redhat.com>
1773
1774 * testsuite/18_support/nested_exception/rethrow_if_nested-term.cc:
1775 Require effective target exceptions_enabled instead of using
1776 dg-skip-if.
1777 * testsuite/23_containers/vector/capacity/constexpr.cc: Expect
1778 shrink_to_fit() to be a no-op without exceptions enabled.
1779 * testsuite/23_containers/vector/capacity/shrink_to_fit.cc:
1780 Likewise.
1781 * testsuite/ext/bitmap_allocator/check_allocate_max_size.cc:
1782 Require effective target exceptions_enabled.
1783 * testsuite/ext/malloc_allocator/check_allocate_max_size.cc:
1784 Likewise.
1785 * testsuite/ext/mt_allocator/check_allocate_max_size.cc:
1786 Likewise.
1787 * testsuite/ext/new_allocator/check_allocate_max_size.cc:
1788 Likewise.
1789 * testsuite/ext/pool_allocator/check_allocate_max_size.cc:
1790 Likewise.
1791 * testsuite/ext/throw_allocator/check_allocate_max_size.cc:
1792 Likewise.
1793
1794 2023-06-07 Jonathan Wakely <jwakely@redhat.com>
1795
1796 * testsuite/20_util/duration/cons/2.cc: Use values that aren't
1797 affected by rounding.
1798 * testsuite/20_util/from_chars/5.cc: Cast arithmetic result to
1799 double before comparing for equality.
1800 * testsuite/20_util/from_chars/6.cc: Likewise.
1801 * testsuite/20_util/variant/86874.cc: Use values that aren't
1802 affected by rounding.
1803 * testsuite/25_algorithms/lower_bound/partitioned.cc: Compare to
1804 original value instead of to floating-point-literal.
1805 * testsuite/26_numerics/random/discrete_distribution/cons/range.cc:
1806 Cast arithmetic result to double before comparing for equality.
1807 * testsuite/26_numerics/random/piecewise_constant_distribution/cons/range.cc:
1808 Likewise.
1809 * testsuite/26_numerics/random/piecewise_linear_distribution/cons/range.cc:
1810 Likewise.
1811 * testsuite/26_numerics/valarray/transcend.cc (eq): Check that
1812 the absolute difference is less than 0.01 instead of comparing
1813 to two decimal places.
1814 * testsuite/27_io/basic_istream/extractors_arithmetic/char/01.cc:
1815 Cast arithmetic result to double before comparing for equality.
1816 * testsuite/27_io/basic_istream/extractors_arithmetic/char/09.cc:
1817 Likewise.
1818 * testsuite/27_io/basic_istream/extractors_arithmetic/char/10.cc:
1819 Likewise.
1820 * testsuite/27_io/basic_istream/extractors_arithmetic/wchar_t/01.cc:
1821 Likewise.
1822 * testsuite/27_io/basic_istream/extractors_arithmetic/wchar_t/09.cc:
1823 Likewise.
1824 * testsuite/27_io/basic_istream/extractors_arithmetic/wchar_t/10.cc:
1825 Likewise.
1826 * testsuite/ext/random/hoyt_distribution/cons/parms.cc: Likewise.
1827
1828 2023-06-07 Jonathan Wakely <jwakely@redhat.com>
1829
1830 Revert:
1831 2023-06-06 Jonathan Wakely <jwakely@redhat.com>
1832
1833 * configure.ac: Use AS_IF.
1834 * configure: Regenerate.
1835
1836 2023-06-07 Thomas Schwinge <thomas@codesourcery.com>
1837
1838 * testsuite/lib/prune.exp (libstdc++-dg-prune): Support
1839 'UNSUPPORTED: [...]: exception handling disabled'.
1840
1841 2023-06-06 Jonathan Wakely <jwakely@redhat.com>
1842
1843 * testsuite/util/testsuite_abi.cc (check_version): Add
1844 CXXABI_1.3.15 symver and make it the latestp. Remove
1845 GLIBCXX_IEEE128_3.4.31 and GLIBCXX_LDBL_3.4.31 from latestp.
1846
1847 2023-06-06 Jonathan Wakely <jwakely@redhat.com>
1848 Jakub Jelinek <jakub@redhat.com>
1849
1850 PR libstdc++/104772
1851 * include/std/limits: (numeric_limits<__float128>): Define
1852 for __STRICT_ANSI__ as well.
1853 * testsuite/18_support/numeric_limits/128bit.cc: Remove
1854 check for __STRICT_ANSI__.
1855
1856 2023-06-06 Jonathan Wakely <jwakely@redhat.com>
1857
1858 * configure.ac: Use AS_IF.
1859 * configure: Regenerate.
1860
1861 2023-06-06 Matthias Kretz <m.kretz@gsi.de>
1862
1863 PR libstdc++/109822
1864 * include/experimental/bits/simd_builtin.h (_S_store): Rewrite
1865 to avoid casts to other vector types. Implement store as
1866 succession of power-of-2 sized memcpy to avoid PR90424.
1867
1868 2023-06-06 Matthias Kretz <m.kretz@gsi.de>
1869
1870 PR libstdc++/110054
1871 * include/experimental/bits/simd_builtin.h (_S_masked_store):
1872 Call into deduced ABI's SimdImpl after conversion.
1873 * include/experimental/bits/simd_x86.h (_S_masked_store_nocvt):
1874 Don't use _mm_maskmoveu_si128. Use the generic fall-back
1875 implementation. Also fix masked stores without SSE2, which
1876 were not doing anything before.
1877
1878 2023-06-06 Matthias Kretz <m.kretz@gsi.de>
1879
1880 * include/experimental/bits/simd.h (__bit_cast): Use
1881 __gnu__::__vector_size__ instead of gnu::vector_size.
1882
1883 2023-06-06 Jonathan Wakely <jwakely@redhat.com>
1884
1885 PR libstdc++/110139
1886 * include/std/array (__array_traits<T, 0>::operator T*()): Make
1887 conversion operator explicit.
1888 (array::front): Use size_type as subscript operand.
1889 (array::data): Use static_cast to make conversion explicit.
1890 * testsuite/23_containers/array/element_access/110139.cc: New
1891 test.
1892
1893 2023-06-06 Joseph Faulls <Joseph.Faulls@imgtec.com>
1894
1895 * include/bits/locale_classes.tcc: Remove check for
1896 codecvt<char8_t, char, mbstate_t> facet.
1897
1898 2023-06-06 Jonathan Wakely <jwakely@redhat.com>
1899
1900 * src/filesystem/ops-common.h (do_copy_file) [O_CLOEXEC]: Set
1901 close-on-exec flag on file descriptors.
1902
1903 2023-06-06 Jonathan Wakely <jwakely@redhat.com>
1904
1905 PR libstdc++/108178
1906 * src/filesystem/ops-common.h (do_copy_file): Check for empty
1907 files by trying to read a character.
1908 * testsuite/27_io/filesystem/operations/copy_file_108178.cc:
1909 New test.
1910
1911 2023-06-06 Jannik Glückert <jannik.glueckert@gmail.com>
1912
1913 * acinclude.m4 (_GLIBCXX_USE_COPY_FILE_RANGE): Define.
1914 * config.h.in: Regenerate.
1915 * configure: Regenerate.
1916 * src/filesystem/ops-common.h (copy_file_copy_file_range):
1917 Define new function.
1918 (do_copy_file): Use it.
1919
1920 2023-06-06 Jannik Glückert <jannik.glueckert@gmail.com>
1921
1922 * acinclude.m4 (_GLIBCXX_HAVE_LSEEK): Define.
1923 * config.h.in: Regenerate.
1924 * configure: Regenerate.
1925 * src/filesystem/ops-common.h (copy_file_sendfile): Define new
1926 function for sendfile logic. Loop to support large files. Skip
1927 zero-length files.
1928 (do_copy_file): Use it.
1929
1930 2023-06-04 Jason Merrill <jason@redhat.com>
1931
1932 PR c++/97720
1933 * libsupc++/eh_call.cc (__cxa_call_terminate): Take void*.
1934 * config/abi/pre/gnu.ver: Add it.
1935
1936 2023-06-02 François Dumont <fdumont@gcc.gnu.org>
1937
1938 * include/parallel/algobase.h: Include <parallel/search.h>.
1939
1940 2023-06-01 Jonathan Wakely <jwakely@redhat.com>
1941
1942 * testsuite/26_numerics/pstl/numeric_ops/transform_reduce.cc:
1943 Add const to equality operator.
1944
1945 2023-06-01 Jonathan Wakely <jwakely@redhat.com>
1946
1947 * include/std/expected (expected::and_then, expected::or_else)
1948 (expected::transform_error): Use _M_val and _M_unex instead of
1949 calling value() and error(), as per LWG 3938.
1950 (expected::transform): Likewise. Remove incorrect std::move
1951 calls from lvalue overloads.
1952 (expected<void, E>::and_then, expected<void, E>::or_else)
1953 (expected<void, E>::transform): Use _M_unex instead of calling
1954 error().
1955 * testsuite/20_util/expected/lwg3877.cc: Add checks for and_then
1956 and transform, and for std::expected<void, E>.
1957 * testsuite/20_util/expected/lwg3938.cc: New test.
1958
1959 2023-06-01 Jonathan Wakely <jwakely@redhat.com>
1960
1961 PR libstdc++/110060
1962 * include/bits/stl_vector.h (_Vector_base::_M_invariant):
1963 Remove.
1964 (vector::size, vector::capacity): Remove calls to _M_invariant.
1965 * include/bits/vector.tcc (vector::_M_fill_assign): Add
1966 optimization hint to reallocating path.
1967 (vector::_M_assign_aux(FwdIter, FwdIter, forward_iterator_tag)):
1968 Likewise.
1969 * testsuite/23_containers/vector/capacity/invariant.cc: Moved
1970 to...
1971 * testsuite/23_containers/vector/modifiers/assign/no_realloc.cc:
1972 ...here. Check assign(FwdIter, FwdIter) too.
1973 * testsuite/23_containers/vector/types/1.cc: Revert addition
1974 of -Wno-stringop-overread option.
1975
1976 2023-06-01 Jonathan Wakely <jwakely@redhat.com>
1977
1978 * doc/xml/manual/evolution.xml: Document removal of implicit
1979 allocator rebinding extensions in strict mode and for C++20.
1980 * doc/html/*: Regenerate.
1981
1982 2023-06-01 Jason Merrill <jason@redhat.com>
1983
1984 * libsupc++/eh_personality.cc (PERSONALITY_FUNCTION): Don't check
1985 handlers in the cleanup phase.
1986
1987 2023-06-01 Matthias Kretz <m.kretz@gsi.de>
1988
1989 PR libstdc++/110050
1990 * include/experimental/bits/simd.h (__vectorized_sizeof): With
1991 __have_neon_a32 only single-precision float works (in addition
1992 to integers).
1993
1994 2023-06-01 François Dumont <fdumont@gcc.gnu.org>
1995
1996 * include/bits/stl_algo.h
1997 (std::__search, std::search(_FwdIt1, _FwdIt1, _FwdIt2, _FwdIt2, _BinPred)): Move...
1998 * include/bits/stl_algobase.h: ...here.
1999 * include/std/functional: Replace <stl_algo.h> include by <stl_algobase.h>.
2000 * include/parallel/algo.h (std::__parallel::search<_FIt1, _FIt2, _BinaryPred>)
2001 (std::__parallel::__search_switch<_FIt1, _FIt2, _BinaryPred, _ItTag1, _ItTag2>):
2002 Move...
2003 * include/parallel/algobase.h: ...here.
2004 * include/experimental/functional: Remove <bits/stl_algo.h> and <parallel/algorithm>
2005 includes. Include <bits/stl_algobase.h>.
2006
2007 2023-05-31 Jonathan Wakely <jwakely@redhat.com>
2008
2009 PR libstdc++/109818
2010 * acinclude.m4 (GLIBCXX_ENABLE_C99): Add separate check for
2011 float_t and double_t and define HAVE_C99_FLT_EVAL_TYPES.
2012 * config.h.in: Regenerate.
2013 * configure: Regenerate.
2014 * include/c_global/cmath (float_t, double_t): Guard using new
2015 _GLIBCXX_HAVE_C99_FLT_EVAL_TYPES macro.
2016
2017 2023-05-31 Jonathan Wakely <jwakely@redhat.com>
2018
2019 * acinclude.m4 (GLIBCXX_ENABLE_C99): Add checks for C99 math
2020 functions and define _GLIBCXX_USE_C99_MATH_FUNCS. Move checks
2021 for C99 rounding functions to here.
2022 (GLIBCXX_CHECK_C99_TR1): Remove checks for C99 rounding
2023 functions from here.
2024 * config.h.in: Regenerate.
2025 * configure: Regenerate.
2026 * include/bits/random.h: Use _GLIBCXX_USE_C99_MATH_FUNCS instead
2027 of _GLIBCXX_USE_C99_MATH_TR1.
2028 * include/bits/random.tcc: Likewise.
2029 * include/c_compatibility/math.h: Likewise.
2030 * include/c_global/cmath: Likewise.
2031 * include/ext/random: Likewise.
2032 * include/ext/random.tcc: Likewise.
2033 * include/std/complex: Likewise.
2034 * testsuite/20_util/from_chars/4.cc: Likewise.
2035 * testsuite/20_util/from_chars/8.cc: Likewise.
2036 * testsuite/26_numerics/complex/proj.cc: Likewise.
2037 * testsuite/26_numerics/headers/cmath/60401.cc: Likewise.
2038 * testsuite/26_numerics/headers/cmath/types_std_c++0x.cc:
2039 Likewise.
2040 * testsuite/lib/libstdc++.exp (check_v3_target_cstdint):
2041 Likewise.
2042 * testsuite/util/testsuite_random.h: Likewise.
2043
2044 2023-05-31 Jonathan Wakely <jwakely@redhat.com>
2045
2046 * include/bits/stl_vector.h (_Vector_base::_M_invariant()): New
2047 function.
2048 (vector::size(), vector::capacity()): Call _M_invariant().
2049 * testsuite/23_containers/vector/capacity/invariant.cc: New test.
2050 * testsuite/23_containers/vector/types/1.cc: Add suppression for
2051 false positive warning (PR110060).
2052
2053 2023-05-31 Jonathan Wakely <jwakely@redhat.com>
2054
2055 PR libstdc++/109921
2056 * src/c++17/floating_from_chars.cc: Check __FLT128_MANT_DIG__ is
2057 defined before trying to use _Float128.
2058
2059 2023-05-31 Jonathan Wakely <jwakely@redhat.com>
2060
2061 * acinclude.m4 (GLIBCXX_ZONEINFO_DIR): Fix for 32-bit pointers
2062 to check __INT_PTR_WIDTH__ instead of sizeof(void*).
2063 * configure: Regenerate.
2064
2065 2023-05-31 Jonathan Wakely <jwakely@redhat.com>
2066
2067 * include/bits/unique_lock.h: Include <bits/error_constants.h>
2068 here for std::errc constants.
2069 * include/std/mutex: Do not include <bits/error_constants.h> and
2070 <exception> here.
2071
2072 2023-05-31 Jonathan Wakely <jwakely@redhat.com>
2073
2074 * configure.ac: Replace use of -o operator for test.
2075 * configure: Regenerate.
2076
2077 2023-05-31 Jonathan Wakely <jwakely@redhat.com>
2078
2079 * include/std/scoped_allocator (scoped_allocator_adaptor): Add
2080 noexcept to all constructors except the default constructor.
2081 (scoped_allocator_adaptor::inner_allocator): Add noexcept.
2082 (scoped_allocator_adaptor::outer_allocator): Likewise.
2083 * testsuite/20_util/scoped_allocator/noexcept.cc: New test.
2084
2085 2023-05-31 Jonathan Wakely <jwakely@redhat.com>
2086
2087 PR libstdc++/104772
2088 * include/std/limits (numeric_limits<__float128>): Define.
2089 * testsuite/18_support/numeric_limits/128bit.cc: New test.
2090
2091 2023-05-31 Jonathan Wakely <jwakely@redhat.com>
2092
2093 * acinclude.m4 (GLIBCXX_ZONEINFO_DIR): Extend logic for avr and
2094 msp430 to all 16-bit targets.
2095 * configure: Regenerate.
2096
2097 2023-05-31 Jonathan Wakely <jwakely@redhat.com>
2098
2099 PR libstdc++/109921
2100 * src/c++17/floating_from_chars.cc (USE_STRTOF128_FOR_FROM_CHARS):
2101 Only define when USE_STRTOD_FOR_FROM_CHARS is also defined.
2102 (USE_STRTOD_FOR_FROM_CHARS): Do not undefine when long double is
2103 binary64.
2104 (from_chars(const char*, const char*, double&, chars_format)):
2105 Check __LDBL_MANT_DIG__ == __DBL_MANT_DIG__ here.
2106 (from_chars(const char*, const char*, _Float128&, chars_format))
2107 Only use from_chars_strtod when USE_STRTOD_FOR_FROM_CHARS is
2108 defined, otherwise parse a long double and convert to _Float128.
2109
2110 2023-05-31 Jonathan Wakely <jwakely@redhat.com>
2111
2112 PR libstdc++/109922
2113 * include/std/iomanip (operator>>(basic_istream&, _Setfill)):
2114 Add deprecated attribute to non-standard overload.
2115 * doc/xml/manual/evolution.xml: Document deprecation.
2116 * doc/html/*: Regenerate.
2117 * testsuite/27_io/manipulators/standard/char/1.cc: Add
2118 dg-warning for expected deprecated warning.
2119 * testsuite/27_io/manipulators/standard/char/2.cc: Likewise.
2120 * testsuite/27_io/manipulators/standard/wchar_t/1.cc: Likewise.
2121 * testsuite/27_io/manipulators/standard/wchar_t/2.cc: Likewise.
2122
2123 2023-05-30 Alexandre Oliva <oliva@adacore.com>
2124
2125 * testsuite/20_util/from_chars/4.cc: Skip long double test06
2126 on x86_64-vxworks.
2127 * testsuite/20_util/to_chars/long_double.cc: Xfail run on
2128 x86_64-vxworks.
2129
2130 2023-05-30 Matthias Kretz <m.kretz@gsi.de>
2131
2132 PR libstdc++/109822
2133 * include/experimental/bits/simd.h (to_native): Use int NTTP
2134 as specified in PTS2.
2135 (to_compatible): Likewise. Add missing tag to call mask
2136 generator ctor.
2137 * testsuite/experimental/simd/pr109822_cast_functions.cc: New
2138 test.
2139
2140 2023-05-30 Matthias Kretz <m.kretz@gsi.de>
2141
2142 * testsuite/experimental/simd/tests/integer_operators.cc:
2143 Compute expected value differently to avoid getting turned into
2144 a vector shift.
2145
2146 2023-05-30 Matthias Kretz <m.kretz@gsi.de>
2147
2148 * testsuite/experimental/simd/tests/operator_cvt.cc: Make long
2149 double <-> (u)long conversion tests conditional on sizeof(long
2150 double) and sizeof(long).
2151
2152 2023-05-26 Matthias Kretz <m.kretz@gsi.de>
2153
2154 * include/experimental/bits/simd_ppc.h (_S_bit_shift_left):
2155 Negative __y is UB, so prefer signed compare.
2156
2157 2023-05-25 Jonathan Wakely <jwakely@redhat.com>
2158
2159 * testsuite/util/testsuite_allocator.h (PointerBase): Add
2160 relational operators.
2161
2162 2023-05-25 Alexandre Oliva <oliva@adacore.com>
2163
2164 * testsuite/20_util/to_chars/long_double.cc: Expect execution
2165 fail on x86-vxworks.
2166
2167 2023-05-24 Matthias Kretz <m.kretz@gsi.de>
2168
2169 PR libstdc++/109949
2170 * include/experimental/bits/simd.h (__intrinsic_type): If
2171 __ALTIVEC__ is defined, map gnu::vector_size types to their
2172 corresponding __vector T types without losing unsignedness of
2173 integer types. Also prefer long long over long.
2174 * include/experimental/bits/simd_ppc.h (_S_popcount): Cast mask
2175 object to the expected unsigned vector type.
2176
2177 2023-05-24 Matthias Kretz <m.kretz@gsi.de>
2178
2179 PR libstdc++/109261
2180 * include/experimental/bits/simd.h (__intrinsic_type):
2181 Specialize __intrinsic_type<double, 8> and
2182 __intrinsic_type<double, 16> in any case, but provide the member
2183 type only with __aarch64__.
2184
2185 2023-05-24 Matthias Kretz <m.kretz@gsi.de>
2186
2187 PR libstdc++/109261
2188 * include/experimental/bits/simd_neon.h (_S_reduce): Add
2189 constexpr and make NEON implementation conditional on
2190 not __builtin_is_constant_evaluated.
2191
2192 2023-05-23 Matthias Kretz <m.kretz@gsi.de>
2193
2194 PR libstdc++/109261
2195 * include/experimental/bits/simd.h (_SimdWrapper::_M_set):
2196 Avoid vector builtin subscripting in constant expressions.
2197 (resizing_simd_cast): Avoid memcpy if constant_evaluated.
2198 (const_where_expression, where_expression, where)
2199 (__extract_part, simd_mask, _SimdIntOperators, simd): Add either
2200 _GLIBCXX_SIMD_CONSTEXPR (on public APIs), or constexpr (on
2201 internal APIs).
2202 * include/experimental/bits/simd_builtin.h (__vector_permute)
2203 (__vector_shuffle, __extract_part, _GnuTraits::_SimdCastType1)
2204 (_GnuTraits::_SimdCastType2, _SimdImplBuiltin)
2205 (_MaskImplBuiltin::_S_store): Add constexpr.
2206 (_CommonImplBuiltin::_S_store_bool_array)
2207 (_SimdImplBuiltin::_S_load, _SimdImplBuiltin::_S_store)
2208 (_SimdImplBuiltin::_S_reduce, _MaskImplBuiltin::_S_load): Add
2209 constant_evaluated case.
2210 * include/experimental/bits/simd_fixed_size.h
2211 (_S_masked_load): Reword comment.
2212 (__tuple_element_meta, __make_meta, _SimdTuple::_M_apply_r)
2213 (_SimdTuple::_M_subscript_read, _SimdTuple::_M_subscript_write)
2214 (__make_simd_tuple, __optimize_simd_tuple, __extract_part)
2215 (__autocvt_to_simd, _Fixed::__traits::_SimdBase)
2216 (_Fixed::__traits::_SimdCastType, _SimdImplFixedSize): Add
2217 constexpr.
2218 (_SimdTuple::operator[], _M_set): Add constexpr and add
2219 constant_evaluated case.
2220 (_MaskImplFixedSize::_S_load): Add constant_evaluated case.
2221 * include/experimental/bits/simd_scalar.h: Add constexpr.
2222 * include/experimental/bits/simd_x86.h (_CommonImplX86): Add
2223 constexpr and add constant_evaluated case.
2224 (_SimdImplX86::_S_equal_to, _S_not_equal_to, _S_less)
2225 (_S_less_equal): Value-initialize to satisfy constexpr
2226 evaluation.
2227 (_MaskImplX86::_S_load): Add constant_evaluated case.
2228 (_MaskImplX86::_S_store): Add constexpr and constant_evaluated
2229 case. Value-initialize local variables.
2230 (_MaskImplX86::_S_logical_and, _S_logical_or, _S_bit_not)
2231 (_S_bit_and, _S_bit_or, _S_bit_xor): Add constant_evaluated
2232 case.
2233 * testsuite/experimental/simd/pr109261_constexpr_simd.cc: New
2234 test.
2235
2236 2023-05-22 Matthias Kretz <m.kretz@gsi.de>
2237
2238 * include/experimental/bits/simd_builtin.h (_S_fpclassify): Move
2239 __infn into #ifdef'ed block.
2240 * testsuite/experimental/simd/tests/fpclassify.cc: Declare
2241 constants only when used.
2242 * testsuite/experimental/simd/tests/frexp.cc: Likewise.
2243 * testsuite/experimental/simd/tests/logarithm.cc: Likewise.
2244 * testsuite/experimental/simd/tests/trunc_ceil_floor.cc:
2245 Likewise.
2246 * testsuite/experimental/simd/tests/ldexp_scalbn_scalbln_modf.cc:
2247 Move totest and expect1 into #ifdef'ed block.
2248
2249 2023-05-19 Gerald Pfeifer <gerald@pfeifer.com>
2250
2251 * doc/xml/manual/strings.xml: Move lafstern.org reference to https.
2252 * doc/html/manual/strings.html: Regenerate.
2253
2254 2023-05-17 Jakub Jelinek <jakub@redhat.com>
2255
2256 PR libstdc++/109883
2257 * testsuite/26_numerics/headers/cmath/constexpr_std_c++23.cc: New test.
2258
2259 2023-05-17 Jakub Jelinek <jakub@redhat.com>
2260
2261 PR libstdc++/109883
2262 * include/c_global/cmath (atan2, fmod, pow): Move
2263 __gnu_cxx::__promote_2 using templates after _Float{16,32,64,128} and
2264 __gnu_cxx::__bfloat16_t overloads.
2265 (copysign, fdim, fmax, fmin, hypot, nextafter, remainder, remquo):
2266 Likewise.
2267 (fma): Move __gnu_cxx::__promote_3 using template after
2268 _Float{16,32,64,128} and __gnu_cxx::__bfloat16_t overloads.
2269
2270 2023-05-17 Jonathan Wakely <jwakely@redhat.com>
2271
2272 * testsuite/18_support/headers/limits/synopsis.cc: Uncomment
2273 checks for float_round_style and float_denorm_style.
2274
2275 2023-05-17 Jonathan Wakely <jwakely@redhat.com>
2276
2277 * include/bits/c++config: Add system_header pragma.
2278
2279 2023-05-17 Jonathan Wakely <jwakely@redhat.com>
2280
2281 * include/std/expected (expected::and_then, expected::or_else)
2282 (expected::transform, expected::transform_error): Fix exception
2283 specifications as per LWG 3877.
2284 (expected<void, E>::and_then, expected<void, E>::transform):
2285 Likewise.
2286 * testsuite/20_util/expected/lwg3877.cc: New test.
2287
2288 2023-05-17 Ken Matsui <kmatsui@cs.washington.edu>
2289
2290 * include/std/type_traits: Use __bool_constant instead of
2291 integral_constant.
2292
2293 2023-05-17 Jonathan Wakely <jwakely@redhat.com>
2294
2295 * configure: Regenerate.
2296
2297 2023-05-16 Jonathan Wakely <jwakely@redhat.com>
2298
2299 PR libstdc++/109741
2300 * acinclude.m4 (GLIBCXX_CHECK_ALIGNAS_CACHELINE): Define.
2301 * config.h.in: Regenerate.
2302 * configure: Regenerate.
2303 * configure.ac: Use GLIBCXX_CHECK_ALIGNAS_CACHELINE.
2304 * src/c++11/shared_ptr.cc (__gnu_internal::get_mutex): Do not
2305 align lock table if not supported. use __GCC_DESTRUCTIVE_SIZE
2306 instead of hardcoded 64.
2307
2308 2023-05-16 Jonathan Wakely <jwakely@redhat.com>
2309
2310 * acinclude.m4 (GLIBCXX_USE_C99): Check for isblank in C++11
2311 mode and define _GLIBCXX_USE_C99_CTYPE. Check for <fenv.h>
2312 functions in C++11 mode and define _GLIBCXX_USE_C99_FENV.
2313 * config.h.in: Regenerate.
2314 * configure: Regenerate.
2315 * include/c_compatibility/fenv.h: Check _GLIBCXX_USE_C99_FENV
2316 instead of _GLIBCXX_USE_C99_FENV_TR1.
2317 * include/c_global/cfenv: Likewise.
2318 * include/c_global/cctype: Check _GLIBCXX_USE_C99_CTYPE instead
2319 of _GLIBCXX_USE_C99_CTYPE_TR1.
2320
2321 2023-05-16 Jonathan Wakely <jwakely@redhat.com>
2322
2323 * acinclude.m4 (GLIBCXX_USE_C99): Check for <stdint.h> types in
2324 C++11 mode and define _GLIBCXX_USE_C99_STDINT. Check for
2325 <inttypes.h> features in C++11 mode and define
2326 _GLIBCXX_USE_C99_INTTYPES and _GLIBCXX_USE_C99_INTTYPES_WCHAR_T.
2327 * config.h.in: Regenerate.
2328 * configure: Regenerate.
2329 * doc/doxygen/user.cfg.in (PREDEFINED): Add new macros.
2330 * include/bits/chrono.h: Check _GLIBCXX_USE_C99_STDINT instead
2331 of _GLIBCXX_USE_C99_STDINT_TR1.
2332 * include/c_compatibility/inttypes.h: Check
2333 _GLIBCXX_USE_C99_INTTYPES and _GLIBCXX_USE_C99_INTTYPES_WCHAR_T
2334 instead of _GLIBCXX_USE_C99_INTTYPES_TR1 and
2335 _GLIBCXX_USE_C99_INTTYPES_WCHAR_T_TR1.
2336 * include/c_compatibility/stdatomic.h: Check
2337 _GLIBCXX_USE_C99_STDINT instead of _GLIBCXX_USE_C99_STDINT_TR1.
2338 * include/c_compatibility/stdint.h: Likewise.
2339 * include/c_global/cinttypes: Check _GLIBCXX_USE_C99_INTTYPES
2340 and _GLIBCXX_USE_C99_INTTYPES_WCHAR_T instead of
2341 _GLIBCXX_USE_C99_INTTYPES_TR1 and
2342 _GLIBCXX_USE_C99_INTTYPES_WCHAR_T_TR1.
2343 * include/c_global/cstdint: Check _GLIBCXX_USE_C99_STDINT
2344 instead of _GLIBCXX_USE_C99_STDINT_TR1.
2345 * include/std/atomic: Likewise.
2346 * src/c++11/cow-stdexcept.cc: Likewise.
2347 * testsuite/29_atomics/headers/stdatomic.h/c_compat.cc:
2348 Likewise.
2349 * testsuite/lib/libstdc++.exp (check_v3_target_cstdint):
2350 Likewise.
2351
2352 2023-05-16 Jonathan Wakely <jwakely@redhat.com>
2353
2354 * acinclude.m4 (GLIBCXX_USE_C99): Check for complex inverse trig
2355 functions in C++11 mode and define _GLIBCXX_USE_C99_COMPLEX_ARC.
2356 * config.h.in: Regenerate.
2357 * configure: Regenerate.
2358 * doc/doxygen/user.cfg.in (PREDEFINED): Add new macro.
2359 * include/std/complex: Check _GLIBCXX_USE_C99_COMPLEX_ARC
2360 instead of _GLIBCXX_USE_C99_COMPLEX_TR1.
2361
2362 2023-05-16 Jonathan Wakely <jwakely@redhat.com>
2363
2364 * testsuite/ext/debug_allocator/check_deallocate_null.cc: Add
2365 assertion to ensure expected exception is throw.
2366
2367 2023-05-16 Jonathan Wakely <jwakely@redhat.com>
2368
2369 * testsuite/libstdc++-prettyprinters/chrono.cc: Only test
2370 printer for chrono::zoned_time for cx11 ABI and tzdb effective
2371 target.
2372
2373 2023-05-16 Jonathan Wakely <jwakely@redhat.com>
2374
2375 * acinclude.m4 (GLIBCXX_CHECK_PTHREAD_MUTEX_CLOCKLOCK): Define
2376 _GLIBCXX_USE_PTHREAD_MUTEX_CLOCKLOCK in terms of _GLIBCXX_TSAN.
2377 * configure: Regenerate.
2378
2379 2023-05-12 Jonathan Wakely <jwakely@redhat.com>
2380
2381 * acinclude.m4 (GLIBCXX_CHECK_C99_TR1): Use a non-null pointer
2382 to check for nan, nanf, and nanl.
2383 * configure: Regenerate.
2384
2385 2023-05-12 Jonathan Wakely <jwakely@redhat.com>
2386
2387 * include/bits/char_traits.h (char_traits<char16_t>): Do not
2388 depend on _GLIBCXX_USE_C99_STDINT_TR1.
2389 (char_traits<char32_t>): Likewise.
2390 * include/experimental/source_location: Likewise.
2391
2392 2023-05-12 Jonathan Wakely <jwakely@redhat.com>
2393
2394 * include/std/atomic (atomic_int_least8_t, atomic_uint_least8_t)
2395 (atomic_int_least16_t, atomic_uint_least16_t)
2396 (atomic_int_least32_t, atomic_uint_least32_t)
2397 (atomic_int_least64_t, atomic_uint_least64_t)
2398 (atomic_int_fast16_t, atomic_uint_fast16_t)
2399 (atomic_int_fast32_t, atomic_uint_fast32_t)
2400 (atomic_int_fast64_t, atomic_uint_fast64_t)
2401 (atomic_intmax_t, atomic_uintmax_t): Define unconditionally.
2402 * testsuite/29_atomics/headers/stdatomic.h/c_compat.cc: Adjust.
2403
2404 2023-05-12 Jonathan Wakely <jwakely@redhat.com>
2405
2406 * include/bits/algorithmfwd.h (shuffle): Do not depend on
2407 _GLIBCXX_USE_C99_STDINT_TR1.
2408 * include/bits/ranges_algo.h (shuffle): Likewise.
2409 * include/bits/stl_algo.h (shuffle): Likewise.
2410 * include/ext/random: Likewise.
2411 * include/ext/throw_allocator.h (random_condition): Likewise.
2412 * include/std/random: Likewise.
2413 * src/c++11/cow-string-inst.cc: Likewise.
2414 * src/c++11/random.cc: Likewise.
2415
2416 2023-05-12 Jonathan Wakely <jwakely@redhat.com>
2417
2418 * testsuite/experimental/feat-cxx14.cc: Remove dependency on
2419 _GLIBCXX_USE_C99_STDINT_TR1.
2420
2421 2023-05-12 Jonathan Wakely <jwakely@redhat.com>
2422
2423 * testsuite/22_locale/locale/cons/unicode.cc: Remove dependency
2424 on _GLIBCXX_USE_C99_STDINT_TR1.
2425
2426 2023-05-12 Jonathan Wakely <jwakely@redhat.com>
2427
2428 * testsuite/21_strings/basic_string_view/typedefs.cc: Remove
2429 dependency on _GLIBCXX_USE_C99_STDINT_TR1.
2430 * testsuite/experimental/string_view/typedefs.cc: Likewise.
2431
2432 2023-05-11 Jonathan Wakely <jwakely@redhat.com>
2433
2434 * src/c++17/floating_from_chars.cc [USE_STRTOD_FOR_FROM_CHARS]
2435 (auto_locale, auto_ferounding): New class types.
2436 (from_chars_impl): Use auto_locale and auto_ferounding.
2437
2438 2023-05-11 Jonathan Wakely <jwakely@redhat.com>
2439
2440 PR libstdc++/109772
2441 * include/std/chrono (hh_mm_ss::__fits): Remove variable
2442 template.
2443 (hh_mm_ss::__subseconds): Remove __fits from constraints.
2444 * testsuite/std/time/hh_mm_ss/109772.cc: New test.
2445 * testsuite/std/time/hh_mm_ss/1.cc: Adjust expected size for
2446 hh_mm_ss<duration<int, std::pico>>.
2447
2448 2023-05-11 Jonathan Wakely <jwakely@redhat.com>
2449
2450 * config/abi/pre/gnu.ver: Export basic_string::_S_allocate.
2451 * include/bits/basic_ios.h: Add static assertion checking
2452 traits_type::value_type.
2453 * include/bits/basic_string.h: Likewise. Do not rebind
2454 allocator, and add static assertion checking its value_type.
2455 (basic_string::_Alloc_traits_impl): Remove class template.
2456 (basic_string::_S_allocate): New static member function.
2457 (basic_string::assign): Use _S_allocate.
2458 * include/bits/basic_string.tcc (basic_string::_M_create)
2459 (basic_string::reserve, basic_string::_M_replace): Likewise.
2460 * testsuite/21_strings/basic_string/requirements/explicit_instantiation/debug.cc:
2461 Disable for C++20 and later.
2462 * testsuite/21_strings/basic_string/requirements/explicit_instantiation/int.cc:
2463 Likweise.
2464
2465 2023-05-11 Jonathan Wakely <jwakely@redhat.com>
2466
2467 PR libstdc++/109758
2468 * include/bits/std_abs.h (abs(__float128)): Handle negative NaN
2469 and negative zero correctly.
2470 * testsuite/26_numerics/headers/cmath/109758.cc: New test.
2471
2472 2023-05-10 François Dumont <fdumont@gcc.gnu.org>
2473
2474 * include/bits/hashtable_policy.h
2475 (_NodeBuilder<>::_S_build): Use __node_ptr.
2476 (_ReuseOrAllocNode<>): Use __node_ptr in place of __node_type*.
2477 (_AllocNode<>): Likewise.
2478 (_Equality<>::_M_equal): Remove const_iterator usages. Only preserved
2479 to call std::is_permutation in the non-unique key implementation.
2480 * include/bits/hashtable.h (_Hashtable<>::_M_update_begin()): Capture
2481 _M_begin() once.
2482 (_Hashtable<>::_M_bucket_begin(size_type)): Implement implicitly inline.
2483 (_Hashtable<>::_M_insert_bucket_begin): Likewise.
2484 (_Hashtable<>::_M_remove_bucket_begin): Likewise.
2485 (_Hashtable<>::_M_compute_hash_code): Use __node_ptr rather than
2486 const_iterator.
2487 (_Hashtable<>::find): Likewise.
2488 (_Hashtable<>::_M_emplace): Likewise.
2489 (_Hashtable<>::_M_insert_unique): Likewise.
2490
2491 2023-05-09 Jonathan Wakely <jwakely@redhat.com>
2492
2493 * python/libstdcxx/v6/printers.py (StdChronoDurationPrinter):
2494 Print floating-point durations correctly.
2495 (StdChronoTimePointPrinter): Support printing only the value,
2496 not the type name. Uncomment handling for known clocks.
2497 (StdChronoZonedTimePrinter): Remove type names from output.
2498 (StdChronoCalendarPrinter): Fix hh_mm_ss member access.
2499 (StdChronoTimeZonePrinter): Add equals sign to output.
2500 * testsuite/libstdc++-prettyprinters/chrono.cc: New test.
2501
2502 2023-05-05 Alexandre Oliva <oliva@adacore.com>
2503
2504 * testsuite/20_util/from_chars/4.cc: Skip long double test06
2505 on aarch64-vxworks.
2506 * testsuite/20_util/to_chars/long_double.cc: Xfail run on
2507 aarch64-vxworks.
2508
2509 2023-05-04 Jonathan Wakely <jwakely@redhat.com>
2510
2511 * doc/xml/manual/abi.xml (abi.versioning.history): Document
2512 libstdc++.so.6.0.32 and GLIBCXX_3.4.32 version.
2513 * doc/html/manual/abi.html: Regenerate.
2514
2515 2023-05-04 Florian Weimer <fweimer@redhat.com>
2516
2517 * doc/xml/manual/abi.xml (abi.versioning.history): Add
2518 GCC_7.0.0, GCC_9.0.0, GCC_11.0, GCC_12.0.0, GCC_13.0.0 for
2519 libgcc_s.
2520
2521 2023-05-03 Jakub Jelinek <jakub@redhat.com>
2522
2523 * src/c++17/floating_from_chars.cc
2524 (_ZSt10from_charsPKcS0_RDF128_St12chars_format): New alias to
2525 _ZSt10from_charsPKcS0_Ru9__ieee128St12chars_format.
2526 * src/c++17/floating_to_chars.cc (_ZSt8to_charsPcS_DF128_): New alias to
2527 _ZSt8to_charsPcS_u9__ieee128.
2528 (_ZSt8to_charsPcS_DF128_St12chars_format): New alias to
2529 _ZSt8to_charsPcS_u9__ieee128St12chars_format.
2530 (_ZSt8to_charsPcS_DF128_St12chars_formati): New alias to
2531 _ZSt8to_charsPcS_u9__ieee128St12chars_formati.
2532 * config/abi/post/powerpc64le-linux-gnu/baseline_symbols.txt: Updated.
2533
2534 2023-05-03 Jakub Jelinek <jakub@redhat.com>
2535
2536 * configure.host (abi_baseline_pair): Use powerpc64le-linux-gnu
2537 rather than powerpc64-linux-gnu for powerpc64le*-linux*.
2538 * config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt: Remove
2539 _ZTI*DF128_, _ZTI*DF64x symbols and symbols in
2540 GLIBCXX_IEEE128_3.4.{29,30,31} and CXXABI_IEEE128_1.3.13 symbol
2541 versions.
2542 * config/abi/post/powerpc64le-linux-gnu/baseline_symbols.txt: New
2543 file.
2544
2545 2023-05-03 Kefu Chai <kefu.chai@scylladb.com>
2546 Jonathan Wakely <jwakely@redhat.com>
2547
2548 PR libstdc++/109703
2549 * include/bits/basic_string.h (basic_string(Iter, Iter, Alloc)):
2550 Initialize _M_string_length.
2551
2552 2023-05-02 Jakub Jelinek <jakub@redhat.com>
2553
2554 * config/abi/post/aarch64-linux-gnu/baseline_symbols.txt: Update.
2555 * config/abi/post/i486-linux-gnu/baseline_symbols.txt: Update.
2556 * config/abi/post/m68k-linux-gnu/baseline_symbols.txt: Update.
2557 * config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt: Update.
2558 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: Update.
2559 * config/abi/post/s390x-linux-gnu/baseline_symbols.txt: Update.
2560 * config/abi/post/x86_64-linux-gnu/32/baseline_symbols.txt: Update.
2561 * config/abi/post/x86_64-linux-gnu/baseline_symbols.txt: Update.
2562
2563 2023-05-02 Jakub Jelinek <jakub@redhat.com>
2564
2565 PR libstdc++/109694
2566 * src/c++98/ios_init.cc: Add #pragma GCC diagnostic ignored for
2567 -Wattribute-alias.
2568
2569 2023-04-28 Jonathan Wakely <jwakely@redhat.com>
2570
2571 * include/bits/random.h (gamma_distribution): Add to the right
2572 doxygen group.
2573 (discrete_distribution, piecewise_constant_distribution)
2574 (piecewise_linear_distribution): Create a new doxygen group and
2575 fix the incomplete doxygen comments.
2576 * include/bits/uniform_int_dist.h (uniform_int_distribution):
2577 Add to doxygen group.
2578
2579 2023-04-28 Jonathan Wakely <jwakely@redhat.com>
2580
2581 * include/bits/uses_allocator.h: Add missing @file comment.
2582 * include/bits/regex.tcc: Remove stray doxygen comments.
2583 * include/experimental/memory_resource: Likewise.
2584 * include/std/bit: Tweak doxygen @cond comments.
2585 * include/std/expected: Likewise.
2586 * include/std/numbers: Likewise.
2587
2588 2023-04-28 Jonathan Wakely <jwakely@redhat.com>
2589
2590 * doc/doxygen/user.cfg.in (STRIP_FROM_PATH): Remove prefixes
2591 from header paths.
2592
2593 2023-04-28 Jonathan Wakely <jwakely@redhat.com>
2594
2595 * include/bits/move.h: Simplify opening/closing namespace std.
2596
2597 2023-04-28 Jakub Jelinek <jakub@redhat.com>
2598
2599 PR libstdc++/108969
2600 * config/abi/pre/gnu.ver (GLIBCXX_3.4.32): Export
2601 _ZSt21ios_base_library_initv.
2602 * testsuite/util/testsuite_abi.cc (check_version): Add GLIBCXX_3.4.32
2603 symver and make it the latestp.
2604 * src/c++98/ios_init.cc (ios_base_library_init): New alias.
2605 * acinclude.m4 (libtool_VERSION): Change to 6:32:0.
2606 * include/std/iostream: If init_priority attribute is supported
2607 and _GLIBCXX_SYMVER_GNU, force undefined _ZSt21ios_base_library_initv
2608 symbol into the object.
2609 * configure: Regenerated.
2610
2611 2023-04-27 Jonathan Wakely <jwakely@redhat.com>
2612
2613 * include/bits/mofunc_impl.h: Fix typo in doxygen comment.
2614 * include/std/format: Likewise.
2615
2616 2023-04-27 Jonathan Wakely <jwakely@redhat.com>
2617
2618 * doc/doxygen/user.cfg.in (FORMULA_TRANSPARENT, DOT_FONTNAME)
2619 (DOT_FONTSIZE, DOT_TRANSPARENT): Remove obsolete options.
2620
2621 2023-04-27 Jonathan Wakely <jwakely@redhat.com>
2622
2623 * doc/doxygen/user.cfg.in (SOURCE_BROWSER): Only set to YES for
2624 HTML docs.
2625 * include/bits/gslice_array.h (_DEFINE_VALARRAY_OPERATOR): Omit
2626 from doxygen docs.
2627 * include/bits/indirect_array.h (_DEFINE_VALARRAY_OPERATOR):
2628 Likewise.
2629 * include/bits/mask_array.h (_DEFINE_VALARRAY_OPERATOR):
2630 Likewise.
2631 * include/bits/slice_array.h (_DEFINE_VALARRAY_OPERATOR):
2632 Likewise.
2633 * include/std/valarray (_DEFINE_VALARRAY_UNARY_OPERATOR)
2634 (_DEFINE_VALARRAY_AUGMENTED_ASSIGNMENT)
2635 (_DEFINE_VALARRAY_EXPR_AUGMENTED_ASSIGNMENT)
2636 (_DEFINE_BINARY_OPERATOR): Likewise.
2637
2638 2023-04-27 Jonathan Wakely <jwakely@redhat.com>
2639
2640 * include/bits/memory_resource.h: Improve doxygen comments.
2641 * include/std/memory_resource: Likewise.
2642
2643 2023-04-27 Jonathan Wakely <jwakely@redhat.com>
2644
2645 PR libstdc++/40380
2646 * include/bits/basic_string.h: Improve doxygen comments.
2647 * include/bits/cow_string.h: Likewise.
2648 * include/bits/forward_list.h: Likewise.
2649 * include/bits/fs_dir.h: Likewise.
2650 * include/bits/fs_path.h: Likewise.
2651 * include/bits/quoted_string.h: Likewise.
2652 * include/bits/stl_bvector.h: Likewise.
2653 * include/bits/stl_map.h: Likewise.
2654 * include/bits/stl_multimap.h: Likewise.
2655 * include/bits/stl_multiset.h: Likewise.
2656 * include/bits/stl_set.h: Likewise.
2657 * include/bits/stl_vector.h: Likewise.
2658 * include/bits/unordered_map.h: Likewise.
2659 * include/bits/unordered_set.h: Likewise.
2660 * include/std/filesystem: Likewise.
2661 * include/std/iomanip: Likewise.
2662
2663 2023-04-27 Jonathan Wakely <jwakely@redhat.com>
2664
2665 PR libstdc++/105081
2666 * src/c++11/random.cc (__throw_syserr): New function.
2667 (random_device::_M_init, random_device::_M_init_pretr1): Use new
2668 function for bad tokens.
2669 (random_device::_M_getval): Use new function for read errors.
2670 * testsuite/util/testsuite_random.h (random_device_available):
2671 Change catch handler to use std::system_error.
2672
2673 2023-04-24 Patrick Palka <ppalka@redhat.com>
2674
2675 * include/bits/max_size_type.h (__max_diff_type::operator>>=):
2676 Fix propagation of sign bit.
2677 * testsuite/std/ranges/iota/max_size_type.cc: Avoid using the
2678 non-standard 'signed typedef-name'. Add some compile-time tests
2679 for right-shifting a negative __max_diff_type value by more than
2680 one.
2681
2682 2023-04-19 Patrick Palka <ppalka@redhat.com>
2683 Jonathan Wakely <jwakely@redhat.com>
2684
2685 PR c++/100157
2686 * include/bits/utility.h (_Nth_type): Conditionally define in
2687 terms of __type_pack_element if available.
2688 * testsuite/20_util/tuple/element_access/get_neg.cc: Prune
2689 additional errors from the new built-in.
2690
2691 2023-04-19 Jonathan Wakely <jwakely@redhat.com>
2692
2693 Revert:
2694 2023-04-18 Jonathan Wakely <jwakely@redhat.com>
2695
2696 PR libstdc++/108969
2697 * src/Makefile.am: Move globals_io.cc to here.
2698 * src/Makefile.in: Regenerate.
2699 * src/c++98/Makefile.am: Remove globals_io.cc from here.
2700 * src/c++98/Makefile.in: Regenerate.
2701 * src/c++98/globals_io.cc [_GLIBCXX_SYMVER_GNU] (cin): Adjust
2702 symbol name and then export with GLIBCXX_3.4.31 symver.
2703 (cout, cerr, clog, wcin, wcout, wcerr, wclog): Likewise.
2704 * config/abi/post/aarch64-linux-gnu/baseline_symbols.txt:
2705 Regenerate.
2706 * config/abi/post/i486-linux-gnu/baseline_symbols.txt:
2707 Regenerate.
2708 * config/abi/post/m68k-linux-gnu/baseline_symbols.txt:
2709 Regenerate.
2710 * config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt:
2711 Regenerate.
2712 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt:
2713 Regenerate.
2714 * config/abi/post/x86_64-linux-gnu/32/baseline_symbols.txt:
2715 Regenerate.
2716 * config/abi/post/s390x-linux-gnu/baseline_symbols.txt:
2717 Regenerate.
2718 * config/abi/post/x86_64-linux-gnu/baseline_symbols.txt:
2719 Regenerate.
2720 * config/abi/pre/gnu.ver: Add iostream objects to new symver.
2721
2722 2023-04-19 Jonathan Wakely <jwakely@redhat.com>
2723
2724 Revert:
2725 2023-04-18 Jonathan Wakely <jwakely@redhat.com>
2726
2727 PR libstdc++/108969
2728 * config/abi/pre/gnu.ver: Fix preprocessor condition.
2729
2730 2023-04-18 Jonathan Wakely <jwakely@redhat.com>
2731
2732 * doc/xml/manual/extensions.xml: Fix example to declare and
2733 qualify std::free, and use NULL instead of 0.
2734 * doc/html/manual/ext_demangling.html: Regenerate.
2735 * libsupc++/cxxabi.h: Adjust doxygen comments.
2736
2737 2023-04-18 Jonathan Wakely <jwakely@redhat.com>
2738
2739 PR libstdc++/108969
2740 * config/abi/pre/gnu.ver: Fix preprocessor condition.
2741
2742 2023-04-18 Jonathan Wakely <jwakely@redhat.com>
2743
2744 PR libstdc++/108969
2745 * src/Makefile.am: Move globals_io.cc to here.
2746 * src/Makefile.in: Regenerate.
2747 * src/c++98/Makefile.am: Remove globals_io.cc from here.
2748 * src/c++98/Makefile.in: Regenerate.
2749 * src/c++98/globals_io.cc [_GLIBCXX_SYMVER_GNU] (cin): Adjust
2750 symbol name and then export with GLIBCXX_3.4.31 symver.
2751 (cout, cerr, clog, wcin, wcout, wcerr, wclog): Likewise.
2752 * config/abi/post/aarch64-linux-gnu/baseline_symbols.txt:
2753 Regenerate.
2754 * config/abi/post/i486-linux-gnu/baseline_symbols.txt:
2755 Regenerate.
2756 * config/abi/post/m68k-linux-gnu/baseline_symbols.txt:
2757 Regenerate.
2758 * config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt:
2759 Regenerate.
2760 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt:
2761 Regenerate.
2762 * config/abi/post/x86_64-linux-gnu/32/baseline_symbols.txt:
2763 Regenerate.
2764 * config/abi/post/s390x-linux-gnu/baseline_symbols.txt:
2765 Regenerate.
2766 * config/abi/post/x86_64-linux-gnu/baseline_symbols.txt:
2767 Regenerate.
2768 * config/abi/pre/gnu.ver: Add iostream objects to new symver.
2769
2770 2023-04-18 Patrick Palka <ppalka@redhat.com>
2771
2772 PR libstdc++/108827
2773 * include/bits/ranges_cmp.h (__cpp_lib_ranges): Bump value
2774 for C++23.
2775 * include/std/ranges (range_adaptor_closure): Define for C++23.
2776 * include/std/version (__cpp_lib_ranges): Bump value for
2777 C++23.
2778 * testsuite/std/ranges/version_c++23.cc: Bump expected value
2779 of __cpp_lib_ranges.
2780 * testsuite/std/ranges/range_adaptor_closure.cc: New test.
2781
2782 2023-04-18 Patrick Palka <ppalka@redhat.com>
2783
2784 * include/bits/ranges_algo.h (__cpp_lib_ranges_contains):
2785 Define for C++23.
2786 (__cpp_lib_ranges_iota): Likewise.
2787 (__cpp_lib_ranges_find_last): Likewise.
2788 (__cpp_lib_fold): Rename to ...
2789 (__cpp_lib_ranges_fold): ... this.
2790 * include/std/version: As above.
2791 * testsuite/25_algorithms/fold_left/1.cc: Adjust after
2792 renaming __cpp_lib_fold.
2793 * testsuite/std/ranges/version_c++23.cc: Verify values
2794 of the above feature-test macros.
2795
2796 2023-04-18 Patrick Palka <ppalka@redhat.com>
2797
2798 PR libstdc++/109525
2799 * include/std/ranges (views::_AsConst::operator()): Add
2800 missing const to constant_range test.
2801 * testsuite/std/ranges/adaptors/as_const/1.cc (test02):
2802 Improve formatting. Adjust expected type of v2.
2803 (test03): New test.
2804
2805 2023-04-14 Patrick Palka <ppalka@redhat.com>
2806
2807 * include/bits/ranges_base.h (const_iterator_t): Define for C++23.
2808 (const_sentinel_t): Likewise.
2809 (range_const_reference_t): Likewise.
2810 (constant_range): Likewise.
2811 (__cust_access::__possibly_const_range): Likewise, replacing ...
2812 (__cust_access::__as_const): ... this.
2813 (__cust_access::_CBegin::operator()): Redefine for C++23 as per P2278R4.
2814 (__cust_access::_CEnd::operator()): Likewise.
2815 (__cust_access::_CRBegin::operator()): Likewise.
2816 (__cust_access::_CREnd::operator()): Likewise.
2817 (__cust_access::_CData::operator()): Likewise.
2818 * include/bits/ranges_util.h (ranges::__detail::__different_from):
2819 Make it an alias of std::__detail::__different_from.
2820 (view_interface::cbegin): Define for C++23.
2821 (view_interface::cend): Likewise.
2822 * include/bits/stl_iterator.h (__detail::__different_from): Define.
2823 (iter_const_reference_t): Define for C++23.
2824 (__detail::__constant_iterator): Likewise.
2825 (__detail::__is_const_iterator): Likewise.
2826 (__detail::__not_a_const_iterator): Likewise.
2827 (__detail::__iter_const_rvalue_reference_t): Likewise.
2828 (__detail::__basic_const_iter_cat):: Likewise.
2829 (const_iterator): Likewise.
2830 (__detail::__const_sentinel): Likewise.
2831 (const_sentinel): Likewise.
2832 (basic_const_iterator): Likewise.
2833 (common_type<basic_const_iterator<_Tp>, _Up>): Likewise.
2834 (common_type<_Up, basic_const_iterator<_Tp>>): Likewise.
2835 (common_type<basic_const_iterator<_Tp>, basic_const_iterator<Up>>):
2836 Likewise.
2837 (make_const_iterator): Define for C++23.
2838 (make_const_sentinel): Likewise.
2839 * include/std/ranges (__cpp_lib_ranges_as_const): Likewise.
2840 (as_const_view): Likewise.
2841 (enable_borrowed_range<as_const_view>): Likewise.
2842 (views::__detail::__is_ref_view): Likewise.
2843 (views::__detail::__can_is_const_view): Likewise.
2844 (views::_AsConst, views::as_const): Likewise.
2845 * include/std/span (span::const_iterator): Likewise.
2846 (span::const_reverse_iterator): Likewise.
2847 (span::cbegin): Likewise.
2848 (span::cend): Likewise.
2849 (span::crbegin): Likewise.
2850 (span::crend): Likewise.
2851 * include/std/version (__cpp_lib_ranges_as_const): Likewise.
2852 * testsuite/std/ranges/adaptors/join.cc (test06): Adjust to
2853 behave independently of C++20 vs C++23.
2854 * testsuite/std/ranges/version_c++23.cc: Verify value of
2855 __cpp_lib_ranges_as_const macro.
2856 * testsuite/24_iterators/const_iterator/1.cc: New test.
2857 * testsuite/std/ranges/adaptors/as_const/1.cc: New test.
2858
2859 2023-04-14 Patrick Palka <ppalka@redhat.com>
2860
2861 * include/bits/ranges_base.h (__cust_access::__as_const)
2862 (__cust_access::_CBegin, __cust::cbegin)
2863 (__cust_access::_CEnd, __cust::cend)
2864 (__cust_access::_CRBegin, __cust::crbegin)
2865 (__cust_access::_CREnd, __cust::crend)
2866 (__cust_access::_CData, __cust::cdata): Move down definitions to
2867 shortly after the definition of input_range.
2868
2869 2023-04-14 Patrick Palka <ppalka@redhat.com>
2870
2871 * include/bits/ranges_algo.h: Include <optional> for C++23.
2872 (__cpp_lib_fold): Define for C++23.
2873 (in_value_result): Likewise.
2874 (__detail::__flipped): Likewise.
2875 (__detail::__indirectly_binary_left_foldable_impl): Likewise.
2876 (__detail::__indirectly_binary_left_foldable): Likewise.
2877 (___detail:__indirectly_binary_right_foldable): Likewise.
2878 (fold_left_with_iter_result): Likewise.
2879 (__fold_left_with_iter_fn, fold_left_with_iter): Likewise.
2880 (__fold_left_fn, fold_left): Likewise.
2881 (__fold_left_first_with_iter_fn, fold_left_first_with_iter):
2882 Likewise.
2883 (__fold_left_first_fn, fold_left_first): Likewise.
2884 (__fold_right_fn, fold_right): Likewise.
2885 (__fold_right_last_fn, fold_right_last): Likewise.
2886 * include/std/version (__cpp_lib_fold): Likewise.
2887 * testsuite/25_algorithms/fold_left/1.cc: New test.
2888 * testsuite/25_algorithms/fold_right/1.cc: New test.
2889
2890 2023-04-14 Jonathan Wakely <jwakely@redhat.com>
2891
2892 * include/std/format (formatter): Add comment to deleted default
2893 constructor of primary template.
2894 (_Checking_scanner): Add static_assert.
2895
2896 2023-04-12 Jonathan Wakely <jwakely@redhat.com>
2897
2898 * doc/xml/manual/using.xml: Document libstdc++exp.a library.
2899 * doc/html/*: Regenerate.
2900
2901 2023-04-12 Jonathan Wakely <jwakely@redhat.com>
2902
2903 * testsuite/17_intro/names.cc [_AIX]: Do not define policy.
2904 * testsuite/19_diagnostics/error_code/cons/lwg3629.cc: Rename
2905 namespace to avoid clashing with libc struct.
2906 * testsuite/19_diagnostics/error_condition/cons/lwg3629.cc:
2907 Likewise.
2908 * testsuite/23_containers/unordered_map/96088.cc: Skip on AIX.
2909 * testsuite/23_containers/unordered_multimap/96088.cc: Likewise.
2910 * testsuite/23_containers/unordered_multiset/96088.cc: Likewise.
2911 * testsuite/23_containers/unordered_set/96088.cc: Likewise.
2912 * testsuite/experimental/synchronized_value.cc: Require gthreads
2913 and add missing option for pthreads targets.
2914
2915 2023-04-12 Patrick Palka <ppalka@redhat.com>
2916
2917 * include/std/ranges (__cpp_lib_ranges_enumerate): Define
2918 for C++23.
2919 (__detail::__range_with_movable_reference): Likewise.
2920 (enumerate_view): Likewise.
2921 (enumerate_view::_Iterator): Likewise.
2922 (enumerate_view::_Sentinel): Likewise.
2923 (views::__detail::__can_enumerate_view): Likewise.
2924 (views::_Enumerate, views::enumerate): Likewise.
2925 * include/std/version (__cpp_lib_ranges_enumerate): Likewise.
2926 * testsuite/std/ranges/version_c++23.cc: Verify value of
2927 __cpp_lib_ranges_enumerate.
2928 * testsuite/std/ranges/adaptors/enumerate/1.cc: New test.
2929
2930 2023-04-12 Patrick Palka <ppalka@redhat.com>
2931
2932 * include/std/ranges (lazy_split_view::_OuterIter::_OuterIter):
2933 Propagate _M_trailing_empty in the const-converting constructor
2934 as per LWG 3904.
2935 * testsuite/std/ranges/adaptors/adjacent/1.cc (test04): Correct
2936 assertion.
2937 * testsuite/std/ranges/adaptors/lazy_split.cc (test12): New test.
2938
2939 2023-04-12 Patrick Palka <ppalka@redhat.com>
2940
2941 * src/c++17/floating_from_chars.cc: Include <algorithm>,
2942 <iterator>, <limits> and <cstdint>.
2943
2944 2023-04-12 Patrick Palka <ppalka@redhat.com>
2945
2946 PR libstdc++/108291
2947 * include/std/ranges (chunk_by_view::_M_find_next): Generalize
2948 parameter types of the lambda wrapper passed to adjacent_find.
2949 (chunk_by_view::_M_find_prev): Likewise.
2950 * testsuite/std/ranges/adaptors/chunk_by/1.cc (test04, test05):
2951 New tests.
2952
2953 2023-04-12 Jonathan Wakely <jwakely@redhat.com>
2954
2955 PR libstdc++/109482
2956 * include/experimental/internet (basic_endpoint::basic_endpoint()):
2957 Ensure that the required union members are active. Only define
2958 as constexpr for C++20 and later.
2959 (basic_endpoint::basic_endpoint(const protocol_type&, port_type)):
2960 Likewise.
2961 * testsuite/experimental/net/internet/endpoint/cons.cc: Only
2962 check constexpr default constructor for C++20 and later.
2963 * testsuite/experimental/net/internet/endpoint/extensible.cc:
2964 Likewise.
2965
2966 2023-04-12 Jonathan Wakely <jwakely@redhat.com>
2967
2968 * src/c++20/tzdata.zi: Import new file from 2023c release.
2969
2970 2023-04-05 Arsen Arsenović <arsen@aarsen.me>
2971
2972 * include/precompiled/stdc++.h (C++17): Don't double-include
2973 <charconv>, once with wrong conditions.
2974 * testsuite/18_support/96817.cc: Require hosted.
2975 * testsuite/18_support/bad_exception/59392.cc: Ditto.
2976 * testsuite/20_util/scoped_allocator/108952.cc: Ditto.
2977 * testsuite/20_util/uses_allocator/lwg3527.cc: Ditto.
2978 * testsuite/29_atomics/atomic/operators/pointer_partial_void.cc:
2979 Ditto.
2980
2981 2023-04-05 Arsen Arsenović <arsen@aarsen.me>
2982
2983 * include/bits/c++config: When __STDC_HOSTED__ is zero,
2984 disable _GLIBCXX_DEBUG and, if it was set, enable
2985 _GLIBCXX_ASSERTIONS.
2986 * testsuite/lib/libstdc++.exp (check_v3_target_debug_mode):
2987 Include <bits/c++config.h> when determining whether debug is
2988 set, in order to inherit the logic from above
2989
2990 2023-04-05 Arsen Arsenović <arsen@aarsen.me>
2991
2992 * testsuite/17_intro/versionconflict.cc: New test.
2993 * include/std/version: Allow disabling the system_header pragma
2994 via _GLIBCXX_TESTING_SYSHDR.
2995
2996 2023-04-05 Arsen Arsenović <arsen@aarsen.me>
2997
2998 * include/bits/unique_ptr.h (__cpp_lib_constexpr_memory):
2999 Synchronize the definition block with...
3000 * include/bits/ptr_traits.h (__cpp_lib_constexpr_memory):
3001 ... this one here. Also define the 202202L value, rather than
3002 leaving it up to purely unique_ptr.h, so that the value is
3003 synchronized across all headers.
3004 (__gnu_debug::_Safe_iterator_base): Move into new conditional
3005 block.
3006 * include/std/memory (__cpp_lib_atomic_value_initialization):
3007 Define on freestanding under the same conditions as in
3008 atomic_base.h.
3009 * include/std/version (__cpp_lib_robust_nonmodifying_seq_ops):
3010 Also define on freestanding.
3011 (__cpp_lib_to_chars): Ditto.
3012 (__cpp_lib_gcd): Ditto.
3013 (__cpp_lib_gcd_lcm): Ditto.
3014 (__cpp_lib_raw_memory_algorithms): Ditto.
3015 (__cpp_lib_array_constexpr): Ditto.
3016 (__cpp_lib_nonmember_container_access): Ditto.
3017 (__cpp_lib_clamp): Ditto.
3018 (__cpp_lib_constexpr_char_traits): Ditto.
3019 (__cpp_lib_constexpr_string): Ditto.
3020 (__cpp_lib_sample): Ditto.
3021 (__cpp_lib_lcm): Ditto.
3022 (__cpp_lib_constexpr_iterator): Ditto.
3023 (__cpp_lib_constexpr_char_traits): Ditto.
3024 (__cpp_lib_interpolate): Ditto.
3025 (__cpp_lib_constexpr_utility): Ditto.
3026 (__cpp_lib_shift): Ditto.
3027 (__cpp_lib_ranges): Ditto.
3028 (__cpp_lib_move_iterator_concept): Ditto.
3029 (__cpp_lib_constexpr_numeric): Ditto.
3030 (__cpp_lib_constexpr_functional): Ditto.
3031 (__cpp_lib_constexpr_algorithms): Ditto.
3032 (__cpp_lib_constexpr_tuple): Ditto.
3033 (__cpp_lib_constexpr_memory): Ditto.
3034
3035 2023-04-05 John David Anglin <danglin@gcc.gnu.org>
3036
3037 * testsuite/22_locale/locale/cons/12658_thread-2.cc: Double
3038 timeout factor on hppa*-*-*.
3039
3040 2023-04-05 Jonathan Wakely <jwakely@redhat.com>
3041
3042 * include/bits/regex.h (sub_match::swap): New function.
3043 * testsuite/28_regex/sub_match/lwg3204.cc: New test.
3044
3045 2023-04-04 Jonathan Wakely <jwakely@redhat.com>
3046
3047 * doc/xml/manual/extensions.xml: Remove std::bad_exception from
3048 example program.
3049 * doc/html/manual/ext_demangling.html: Regenerate.
3050
3051 2023-03-31 Jonathan Wakely <jwakely@redhat.com>
3052
3053 PR tree-optimization/107087
3054 * include/bits/cow_string.h (basic_string::size()): Add
3055 optimizer hint that _S_empty_rep()._M_length is always zero.
3056 (basic_string::length()): Call size().
3057
3058 2023-03-31 Jonathan Wakely <jwakely@redhat.com>
3059
3060 PR libstdc++/109339
3061 * include/std/stop_token (_Stop_state_ptr(const stop_source&)):
3062 Add attribute access with access-mode 'none'.
3063 * testsuite/30_threads/stop_token/stop_source/109339.cc: New test.
3064
3065 2023-03-31 Jonathan Wakely <jwakely@redhat.com>
3066
3067 * include/experimental/internet (ip::basic_endpoint::_M_if_v6):
3068 Revert change from member function to data member. Fix for
3069 constant evaluation by detecting which union member is active.
3070 (ip::basic_endpoint::resize): Revert changes to update _M_is_v6
3071 flag.
3072
3073 2023-03-29 Jonathan Wakely <jwakely@redhat.com>
3074
3075 PR libstdc++/109242
3076 * testsuite/20_util/optional/monadic/pr109340.cc: Moved to...
3077 * testsuite/20_util/optional/monadic/pr109242.cc: ...here.
3078
3079 2023-03-29 Jonathan Wakely <jwakely@redhat.com>
3080
3081 * include/experimental/internet (ip::make_address): Implement
3082 missing overload.
3083 (ip::address_v4::broadcast()): Avoid undefined shift.
3084 (ip::basic_endpoint): Fix member functions for constexpr.
3085 (ip::basic_endpoint::_M_is_v6): Replace member function with
3086 data member, adjust member functions using it.
3087 (ip::basic_endpoint::resize): Update _M_is_v6 based on sockaddr
3088 content.
3089 * testsuite/experimental/net/internet/address/v4/cons.cc: Fix
3090 constexpr checks to work in C++14.
3091 * testsuite/experimental/net/internet/address/v4/creation.cc:
3092 Likewise.
3093 * testsuite/experimental/net/internet/endpoint/cons.cc:
3094 Likewise.
3095 * testsuite/experimental/net/internet/network/v4/cons.cc:
3096 Likewise.
3097 * testsuite/experimental/net/internet/network/v4/members.cc:
3098 Likewise.
3099 * testsuite/experimental/net/internet/endpoint/extensible.cc: New test.
3100
3101 2023-03-29 Jonathan Wakely <jwakely@redhat.com>
3102
3103 * include/std/expected (expected::value() &): Use const lvalue
3104 for unex member passed to bad_expected_access constructor, as
3105 per LWG 3843.
3106
3107 2023-03-29 Jonathan Wakely <jwakely@redhat.com>
3108
3109 PR libstdc++/109340
3110 * include/std/expected (expected::transform): Use
3111 std::remove_cv_t instead of std::remove_cvref_t.
3112 (expected::transform_error): Likewise.
3113 (expected<cv void, E>::transform): Likewise.
3114 (expected<cv void, E>::transform_error): Likewise.
3115 * include/std/optional (transform): Use std::remove_cv_t.
3116 * testsuite/20_util/optional/monadic/pr109340.cc: New test.
3117
3118 2023-03-29 Jonathan Wakely <jwakely@redhat.com>
3119
3120 * include/std/optional (optional): Adjust static assertion to
3121 reject arrays and functions as well as references.
3122 * testsuite/20_util/optional/requirements_neg.cc: New test.
3123
3124 2023-03-28 Jonathan Wakely <jwakely@redhat.com>
3125
3126 PR libstdc++/103387
3127 * include/bits/istream.tcc (istream::_M_extract(ValueT&)): Use
3128 std::use_facet instead of cached _M_num_get facet.
3129 (istream::operator>>(short&)): Likewise.
3130 (istream::operator>>(int&)): Likewise.
3131 * include/bits/ostream.tcc (ostream::_M_insert(ValueT)): Use
3132 std::use_facet instead of cached _M_num_put facet.
3133
3134 2023-03-28 Jonathan Wakely <jwakely@redhat.com>
3135
3136 * include/bits/char_traits.h (char_traits::copy): Return without
3137 using memcpy if n==0.
3138 (char_traits::assign): Likewise for memset.
3139
3140 2023-03-28 Jonathan Wakely <jwakely@redhat.com>
3141
3142 PR libstdc++/109299
3143 * include/bits/basic_string.h (basic_string::_M_is_local()): Add
3144 hint for compiler that local strings fit in the local buffer.
3145
3146 2023-03-28 Jonathan Wakely <jwakely@redhat.com>
3147
3148 PR libstdc++/109288
3149 * include/std/chrono (__detail::__get_leap_second_info): Update
3150 expiry date of hardcoded leapseconds list.
3151 * src/c++20/tzdb.cc (tzdb_list::_Node::_S_read_leap_seconds()):
3152 Likewise.
3153 * src/c++20/tzdata.zi: Import new file from 2023a release.
3154 * testsuite/std/time/time_zone/get_info_local.cc: Only check
3155 transitions for Egypt up to 2014.
3156
3157 2023-03-28 Matthias Kretz <m.kretz@gsi.de>
3158
3159 * include/experimental/bits/simd.h (is_simd_flag_type): New.
3160 (_IsSimdFlagType): New.
3161 (copy_from, copy_to, load ctors): Constrain _Flags using
3162 _IsSimdFlagType.
3163
3164 2023-03-28 Matthias Kretz <m.kretz@gsi.de>
3165
3166 * include/experimental/bits/simd_x86.h (_SimdImplX86): Use
3167 _Base::_S_divides if the optimized _S_divides function is hidden
3168 via the preprocessor.
3169
3170 2023-03-27 Jakub Jelinek <jakub@redhat.com>
3171
3172 * testsuite/experimental/net/timer/waitable/dest.cc: Avoid -Wformat
3173 warning if size_t is not unsigned long.
3174
3175 2023-03-22 Jonathan Wakely <jwakely@redhat.com>
3176
3177 * include/bits/shared_ptr_atomic.h (atomic::operator=(nullptr_t)):
3178 Add overload, as per LWG 3893.
3179 * testsuite/20_util/shared_ptr/atomic/atomic_shared_ptr.cc:
3180 Check assignment from nullptr.
3181
3182 2023-03-22 Jonathan Wakely <jwakely@redhat.com>
3183
3184 * include/std/format (formatter<const charT[N], charT>): Do not
3185 define partial speclialization, as per LWG 3833.
3186 * testsuite/std/format/formatter/requirements.cc: Check it.
3187
3188 2023-03-22 Jonathan Wakely <jwakely@redhat.com>
3189
3190 * include/std/utility (__cpp_lib_constexpr_algorithms): Define,
3191 as per LWG 3792.
3192 * testsuite/20_util/exchange/constexpr.cc: Check for it.
3193
3194 2023-03-22 Jonathan Wakely <jwakely@redhat.com>
3195
3196 * include/std/version (__cpp_lib_format): Define.
3197 * testsuite/std/format/functions/format.cc: Check it.
3198
3199 2023-03-22 Jonathan Wakely <jwakely@redhat.com>
3200
3201 * include/bits/basic_string.tcc (basic_string::resize_and_overwrite):
3202 Pass rvalues to the callback, as now allowed by LWG 3645.
3203 Enforce preconditions on the return value.
3204 * testsuite/21_strings/basic_string/capacity/char/resize_and_overwrite.cc:
3205 Adjust.
3206
3207 2023-03-22 Jonathan Wakely <jwakely@redhat.com>
3208
3209 * include/std/format: Add a comment noting that the resolution
3210 of LWG 3720 has been applied..
3211
3212 2023-03-22 Jonathan Wakely <jwakely@redhat.com>
3213
3214 * include/bits/regex.h (match_results): Add allocator-extended
3215 copy and move constructors, as per LWG 2195.
3216 * testsuite/28_regex/match_results/ctors/char/alloc.cc: New test.
3217
3218 2023-03-22 Jonathan Wakely <jwakely@redhat.com>
3219
3220 * include/bits/stream_iterator.h (istream_iterator): Add
3221 constexpr to copy constructor, as per LWG 3600.
3222 * testsuite/24_iterators/istream_iterator/cons/constexpr.cc:
3223 Check copy construction.
3224
3225 2023-03-21 Matthias Kretz <m.kretz@gsi.de>
3226
3227 * include/experimental/bits/simd_x86.h
3228 (_SimdImplX86::_S_divides): Replace test for __GCC_IEC_559 == 0
3229 with __RECIPROCAL_MATH__.
3230
3231 2023-03-21 Matthias Kretz <m.kretz@gsi.de>
3232
3233 * include/experimental/bits/simd_detail.h: Don't define
3234 _GLIBCXX_SIMD_WORKAROUND_PR90993 for Clang.
3235 * include/experimental/bits/simd_x86.h (_S_divides): Remove
3236 check for __clang__.
3237
3238 2023-03-21 Matthias Kretz <m.kretz@gsi.de>
3239
3240 * include/experimental/bits/simd_detail.h: Don't declare the
3241 simd API as constexpr with Clang.
3242 * include/experimental/bits/simd_x86.h (__movm): New.
3243 (_S_blend_avx512): Resolve FIXME. Implement blend using __movm
3244 and ?:.
3245 (_SimdImplX86::_S_masked_unary): Clang does not implement the
3246 same builtins. Implement the function using __movm, ?:, and -
3247 operators on vector_size types instead.
3248
3249 2023-03-21 Matthias Kretz <m.kretz@gsi.de>
3250
3251 * testsuite/experimental/simd/tests/operators.cc: Clang doesn't
3252 define __GCC_IEC_559. Use __STDC_IEC_559__ instead.
3253
3254 2023-03-20 Jonathan Wakely <jwakely@redhat.com>
3255
3256 * src/filesystem/ops-common.h (get_temp_directory_from_env): Fix
3257 formatting.
3258
3259 2023-03-20 Marek Polacek <polacek@redhat.com>
3260
3261 PR c++/109159
3262 * testsuite/20_util/pair/cons/explicit_construct.cc: Adjust dg-error.
3263 * testsuite/20_util/tuple/cons/explicit_construct.cc: Likewise.
3264 * testsuite/23_containers/span/explicit.cc: Likewise.
3265
3266 2023-03-20 Jonathan Wakely <jwakely@redhat.com>
3267
3268 PR libstdc++/109182
3269 * include/std/expected (expected<void>::expected(in_place_t)):
3270 Remove template-head.
3271
3272 2023-03-18 Jonathan Wakely <jwakely@redhat.com>
3273
3274 PR libstdc++/109165
3275 * testsuite/18_support/coroutines/hash.cc: Use const object
3276 in second call.
3277
3278 2023-03-17 Jonathan Wakely <jwakely@redhat.com>
3279
3280 PR libstdc++/109165
3281 * include/std/coroutine (hash<>::operator()): Add const.
3282 * testsuite/18_support/coroutines/hash.cc: New test.
3283
3284 2023-03-14 Patrick Palka <ppalka@redhat.com>
3285
3286 PR libstdc++/109111
3287 * include/std/ranges (repeat_view): Remove redundant parentheses
3288 in requires-clause.
3289 (repeat_view::_Iterator): Correct the requires-clause.
3290
3291 2023-03-14 Patrick Palka <ppalka@redhat.com>
3292
3293 * include/bits/stl_iterator.h (move_iterator::_S_iter_concept):
3294 Define.
3295 (__cpp_lib_move_iterator_concept): Define for C++20.
3296 (move_iterator::iterator_concept): Strengthen as per P2520R0.
3297 * include/std/version (__cpp_lib_move_iterator_concept): Define
3298 for C++20.
3299 * testsuite/24_iterators/move_iterator/p2520r0.cc: New test.
3300
3301 2023-03-14 Patrick Palka <ppalka@redhat.com>
3302
3303 * include/bits/ranges_util.h (view_interface::empty): Add
3304 preferred overloads that use ranges::size when the range is
3305 sized as per LWG 3715.
3306 * testsuite/std/ranges/adaptors/lwg3715.cc: New test.
3307
3308 2023-03-14 Jonathan Wakely <jwakely@redhat.com>
3309
3310 * include/bits/chrono.h (__is_duration_v, __is_time_point_v):
3311 Only define for C++17 and later.
3312
3313 2023-03-14 Jonathan Wakely <jwakely@redhat.com>
3314
3315 * src/Makefile.am: Add comment about linker script fragments.
3316 * src/Makefile.in: Regenerate.
3317
3318 2023-03-14 Jonathan Wakely <jwakely@redhat.com>
3319
3320 PR libstdc++/62196
3321 * include/bits/mask_array.h (mask_array): Add assertions to
3322 assignment operators.
3323 * include/std/valarray (valarray::operator[](valarray<bool>)):
3324 Add assertions.
3325 * testsuite/26_numerics/valarray/mask-1_neg.cc: New test.
3326 * testsuite/26_numerics/valarray/mask-2_neg.cc: New test.
3327 * testsuite/26_numerics/valarray/mask-3_neg.cc: New test.
3328 * testsuite/26_numerics/valarray/mask-4_neg.cc: New test.
3329 * testsuite/26_numerics/valarray/mask-5_neg.cc: New test.
3330 * testsuite/26_numerics/valarray/mask-6_neg.cc: New test.
3331 * testsuite/26_numerics/valarray/mask-7_neg.cc: New test.
3332 * testsuite/26_numerics/valarray/mask-8_neg.cc: New test.
3333 * testsuite/26_numerics/valarray/mask.cc: New test.
3334
3335 2023-03-13 Jakub Jelinek <jakub@redhat.com>
3336
3337 * config/abi/post/aarch64-linux-gnu/baseline_symbols.txt: Update.
3338 * config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt: Update.
3339
3340 2023-03-13 Jonathan Wakely <jwakely@redhat.com>
3341
3342 * doc/Makefile.am: Add comment referring to documentation.
3343 * doc/Makefile.in: Regenerate.
3344
3345 2023-03-13 Jonathan Wakely <jwakely@redhat.com>
3346
3347 * doc/html/*: Regenerate.
3348
3349 2023-03-13 Jonny Grant <jg@jguk.org>
3350
3351 * doc/xml/faq.xml: Update copyright year.
3352
3353 2023-03-13 Jonathan Wakely <jwakely@redhat.com>
3354
3355 * include/bits/allocator.h: Fix typo in comment.
3356
3357 2023-03-12 Jakub Jelinek <jakub@redhat.com>
3358
3359 * config/abi/pre/gnu.ver (CXXABI_1.3.14): Also export __bf16 tinfos
3360 if it isn't mangled as DF16b but u6__bf16.
3361
3362 2023-03-12 Gerald Pfeifer <gerald@pfeifer.com>
3363
3364 * doc/xml/manual/documentation_hacking.xml: Move www.graphviz.org
3365 to https.
3366 * doc/html/manual/documentation_hacking.html: Regenerate.
3367
3368 2023-03-10 Jonathan Wakely <jwakely@redhat.com>
3369
3370 PR libstdc++/109064
3371 * python/libstdcxx/v6/xmethods.py (SharedPtrUseCountWorker):
3372 Remove self-recursion in __init__. Add missing _supports.
3373 * testsuite/libstdc++-xmethods/shared_ptr.cc: Check use_count()
3374 and unique().
3375
3376 2023-03-09 Patrick Palka <ppalka@redhat.com>
3377
3378 * include/std/ranges
3379 (cartesian_product_view::_Iterator::_Iterator): Remove
3380 constraint on default constructor as per LWG 3849.
3381 (cartesian_product_view::_Iterator::_M_prev): Adjust position
3382 of _Nm > 0 test as per LWG 3820.
3383 (cartesian_product_view::_Iterator::_M_advance): Perform bounds
3384 checking only on sized cartesian products.
3385 * testsuite/std/ranges/cartesian_product/1.cc (test08): New test.
3386
3387 2023-03-09 Patrick Palka <ppalka@redhat.com>
3388
3389 PR libstdc++/109024
3390 * include/std/ranges (chunk_by_view::_M_pred): Remove DMI as per
3391 LWG 3796.
3392 (repeat_view::_M_pred): Likewise.
3393 * testsuite/std/ranges/adaptors/chunk_by/1.cc (test03): New test.
3394 * testsuite/std/ranges/repeat/1.cc (test05): New test.
3395
3396 2023-03-09 Patrick Palka <ppalka@redhat.com>
3397
3398 PR libstdc++/108362
3399 * include/std/ranges (__detail::__can_single_view): New concept.
3400 (_Single::operator()): Constrain it. Move [[nodiscard]] to the
3401 end of the function declarator.
3402 (__detail::__can_iota_view): New concept.
3403 (_Iota::operator()): Constrain it. Move [[nodiscard]] to the
3404 end of the function declarator.
3405 (__detail::__can_istream_view): New concept.
3406 (_Istream::operator()): Constrain it. Move [[nodiscard]] to the
3407 end of the function declarator.
3408 * testsuite/std/ranges/iota/iota_view.cc (test07): New test.
3409 * testsuite/std/ranges/istream_view.cc (test08): New test.
3410 * testsuite/std/ranges/single_view.cc (test07): New test.
3411
3412 2023-03-09 Patrick Palka <ppalka@redhat.com>
3413
3414 PR libstdc++/107572
3415 * include/std/ranges (cartesian_product_view::end): When
3416 building the tuple of iterators, avoid calling ranges::begin on
3417 the first range if __empty_tail is false.
3418 * testsuite/std/ranges/cartesian_product/1.cc (test07): New test.
3419
3420 2023-03-09 Jonathan Wakely <jwakely@redhat.com>
3421
3422 PR libstdc++/108882
3423 * config/os/gnu-linux/ldbl-ieee128-extra.ver: Fix incorrect
3424 patterns.
3425
3426 2023-03-07 Jakub Jelinek <jakub@redhat.com>
3427
3428 * config/abi/post/x86_64-linux-gnu/baseline_symbols.txt: Update.
3429 * config/abi/post/x86_64-linux-gnu/32/baseline_symbols.txt: Update.
3430 * config/abi/post/i486-linux-gnu/baseline_symbols.txt: Update.
3431 * config/abi/post/aarch64-linux-gnu/baseline_symbols.txt: Update.
3432 * config/abi/post/s390x-linux-gnu/baseline_symbols.txt: Update.
3433
3434 2023-03-07 Jonathan Wakely <jwakely@redhat.com>
3435
3436 PR libstdc++/108882
3437 * config/abi/pre/gnu.ver (GLIBCXX_3.4.31): Adjust patterns to
3438 not match symbols in namespace std::__gnu_cxx11_ieee128.
3439 * config/os/gnu-linux/ldbl-ieee128-extra.ver: Add patterns for
3440 std::__gnu_cxx11_ieee128::money_{get,put}.
3441
3442 2023-03-07 Jonathan Wakely <jwakely@redhat.com>
3443
3444 * libsupc++/eh_personality.cc: Fix spelling in comment.
3445
3446 2023-03-03 Alexandre Oliva <oliva@adacore.com>
3447
3448 * testsuite/30_threads/async/async.cc (test04): Initialize
3449 steady_start, renamed from steady_begin, next to slow_start.
3450 Increase tolerance for final wait.
3451
3452 2023-03-03 Alexandre Oliva <oliva@adacore.com>
3453
3454 * testsuite/libstdc++-prettyprinters/80276.cc: Add
3455 std::string to debug info.
3456 * testsuite/libstdc++-prettyprinters/libfundts.cc: Likewise.
3457
3458 2023-03-03 Alexandre Oliva <oliva@adacore.com>
3459
3460 PR libstdc++/104852
3461 PR libstdc++/95989
3462 PR libstdc++/52590
3463 * include/bits/std_thread.h (thread::_M_thread_deps): New
3464 static implicitly-inline member function.
3465 (std::thread template ctor): Pass it to _M_start_thread.
3466 * src/c++11/thread.cc (thread::_M_start_thread): Name depend
3467 parameter, force it live on entry.
3468
3469 2023-03-03 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3470
3471 * config/abi/post/i386-solaris/baseline_symbols.txt: Regenerate.
3472 * config/abi/post/i386-solaris/amd64/baseline_symbols.txt:
3473 Likewise.
3474 * config/abi/post/sparc-solaris/baseline_symbols.txt: Likewise.
3475 * config/abi/post/sparc-solaris/sparcv9/baseline_symbols.txt:
3476 Likewise.
3477
3478 2023-03-01 Jonathan Wakely <jwakely@redhat.com>
3479
3480 * include/bits/cow_string.h: Fix typo in comment.
3481
3482 2023-03-01 Jonathan Wakely <jwakely@redhat.com>
3483
3484 * src/c++20/tzdb.cc (chrono::tzdb::current_zone()) Use "UTC" if
3485 current time zone cannot be determined.
3486 * testsuite/std/time/tzdb/1.cc: Remove conditions based on
3487 HAVE_TZDB macro and test all members unconditionally.
3488
3489 2023-02-28 Jonathan Wakely <jwakely@redhat.com>
3490
3491 PR libstdc++/108952
3492 * include/bits/uses_allocator_args.h
3493 (uses_allocator_construction_args): Implement LWG 3527.
3494 * testsuite/20_util/pair/astuple/get-2.cc: New test.
3495 * testsuite/20_util/scoped_allocator/108952.cc: New test.
3496 * testsuite/20_util/uses_allocator/lwg3527.cc: New test.
3497
3498 2023-02-28 Jonathan Wakely <jwakely@redhat.com>
3499
3500 PR libstdc++/108846
3501 * include/bits/stl_algobase.h (__copy_move<false, false, RA>)
3502 Add __assign_one static member function.
3503 (__copy_move<true, false, RA>): Likewise.
3504 (__copy_move<IsMove, true, RA>): Do not use memmove for a single
3505 value.
3506 (__copy_move_backward<IsMove, true, RA>): Likewise.
3507 * testsuite/25_algorithms/copy/108846.cc: New test.
3508 * testsuite/25_algorithms/copy_backward/108846.cc: New test.
3509 * testsuite/25_algorithms/copy_n/108846.cc: New test.
3510 * testsuite/25_algorithms/move/108846.cc: New test.
3511 * testsuite/25_algorithms/move_backward/108846.cc: New test.
3512
3513 2023-02-28 Jonathan Wakely <jwakely@redhat.com>
3514
3515 * src/c++11/codecvt.cc: Add [[likely]] and [[unlikely]]
3516 attributes.
3517
3518 2023-02-27 Jonathan Wakely <jwakely@redhat.com>
3519
3520 * include/bits/basic_ios.h (basic_ios::_M_setstate): Add
3521 caveat to comment.
3522 * include/bits/basic_string.h (resize_and_overwrite): Add
3523 doxygen comment.
3524
3525 2023-02-24 Matthias Kretz <m.kretz@gsi.de>
3526
3527 * include/experimental/bits/simd.h: Line breaks and indenting
3528 fixed to follow the libstdc++ standard.
3529 * include/experimental/bits/simd_builtin.h: Likewise.
3530 * include/experimental/bits/simd_fixed_size.h: Likewise.
3531 * include/experimental/bits/simd_neon.h: Likewise.
3532 * include/experimental/bits/simd_ppc.h: Likewise.
3533 * include/experimental/bits/simd_scalar.h: Likewise.
3534 * include/experimental/bits/simd_x86.h: Likewise.
3535
3536 2023-02-24 Matthias Kretz <m.kretz@gsi.de>
3537
3538 PR libstdc++/108030
3539 * include/experimental/bits/simd_fixed_size.h
3540 (_SimdImplFixedSize::_S_broadcast): Replace inline with
3541 _GLIBCXX_SIMD_INTRINSIC.
3542 (_SimdImplFixedSize::_S_generate): Likewise.
3543 (_SimdImplFixedSize::_S_load): Likewise.
3544 (_SimdImplFixedSize::_S_masked_load): Likewise.
3545 (_SimdImplFixedSize::_S_store): Likewise.
3546 (_SimdImplFixedSize::_S_masked_store): Likewise.
3547 (_SimdImplFixedSize::_S_min): Likewise.
3548 (_SimdImplFixedSize::_S_max): Likewise.
3549 (_SimdImplFixedSize::_S_complement): Likewise.
3550 (_SimdImplFixedSize::_S_unary_minus): Likewise.
3551 (_SimdImplFixedSize::_S_plus): Likewise.
3552 (_SimdImplFixedSize::_S_minus): Likewise.
3553 (_SimdImplFixedSize::_S_multiplies): Likewise.
3554 (_SimdImplFixedSize::_S_divides): Likewise.
3555 (_SimdImplFixedSize::_S_modulus): Likewise.
3556 (_SimdImplFixedSize::_S_bit_and): Likewise.
3557 (_SimdImplFixedSize::_S_bit_or): Likewise.
3558 (_SimdImplFixedSize::_S_bit_xor): Likewise.
3559 (_SimdImplFixedSize::_S_bit_shift_left): Likewise.
3560 (_SimdImplFixedSize::_S_bit_shift_right): Likewise.
3561 (_SimdImplFixedSize::_S_remquo): Add inline keyword (to be
3562 explicit about not always-inline, yet).
3563 (_SimdImplFixedSize::_S_isinf): Likewise.
3564 (_SimdImplFixedSize::_S_isfinite): Likewise.
3565 (_SimdImplFixedSize::_S_isnan): Likewise.
3566 (_SimdImplFixedSize::_S_isnormal): Likewise.
3567 (_SimdImplFixedSize::_S_signbit): Likewise.
3568
3569 2023-02-24 Matthias Kretz <m.kretz@gsi.de>
3570
3571 PR libstdc++/108856
3572 * include/experimental/bits/simd_builtin.h
3573 (_SimdImplBuiltin::_S_masked_unary): More efficient
3574 implementation of masked inc-/decrement for integers and floats
3575 without AVX2.
3576 * include/experimental/bits/simd_x86.h
3577 (_SimdImplX86::_S_masked_unary): New. Use AVX512 masked subtract
3578 builtins for masked inc-/decrement.
3579
3580 2023-02-24 Jonathan Wakely <jwakely@redhat.com>
3581
3582 * include/experimental/executor (executor): Constrain template
3583 constructors.
3584
3585 2023-02-24 Jonathan Wakely <jwakely@redhat.com>
3586
3587 * include/experimental/internet (basic_endpoint): Add missing
3588 constexpr to comparison operators.
3589 * testsuite/experimental/net/internet/endpoint/cons.cc: New test.
3590
3591 2023-02-24 Jonathan Wakely <jwakely@redhat.com>
3592
3593 * include/experimental/internet (network_v4::netmask()): Avoid
3594 undefined shift.
3595 (network_v4::broadcast()): Optimize and fix for targets with
3596 uint_least32_t wider than 32 bits.
3597 (network_v4::to_string(const Allocator&)): Fix for custom
3598 allocators and optimize using to_chars.
3599 (operator==(const network_v4&, const network_v4&)): Add missing
3600 constexpr.
3601 (operator==(const network_v6&, const network_v6&)): Likewise.
3602 * testsuite/experimental/net/internet/network/v4/cons.cc: New test.
3603 * testsuite/experimental/net/internet/network/v4/members.cc: New test.
3604
3605 2023-02-24 Jonathan Wakely <jwakely@redhat.com>
3606
3607 * include/experimental/internet (address_4(const bytes_type&)):
3608 Use __builtin_bit_cast if available, otherwise convert to
3609 network byte order.
3610 (address_v4::to_bytes()): Likewise, but convert from network
3611 byte order.
3612 * testsuite/experimental/net/internet/address/v4/cons.cc: Fix
3613 incorrect tests. Check for constexpr too.
3614 * testsuite/experimental/net/internet/address/v4/creation.cc:
3615 Likewise.
3616 * testsuite/experimental/net/internet/address/v4/members.cc:
3617 Check that bytes_type is a standard-layout type.
3618
3619 2023-02-24 Jonathan Wakely <jwakely@redhat.com>
3620
3621 * include/experimental/internet (address_v4::to_string):
3622 Optimize.
3623 * testsuite/experimental/net/internet/address/v4/members.cc:
3624 Check more addresses.
3625
3626 2023-02-24 Jonathan Wakely <jwakely@redhat.com>
3627
3628 * include/ext/aligned_buffer.h (__aligned_buffer): Add
3629 diagnostic pragmas.
3630
3631 2023-02-24 Jonathan Wakely <jwakely@redhat.com>
3632
3633 * testsuite/std/format/arguments/lwg3810.cc: Move dg-options
3634 before dg-do.
3635
3636 2023-02-23 Matthias Kretz <m.kretz@gsi.de>
3637
3638 * testsuite/experimental/simd/tests/reductions.cc: Introduce
3639 max_distance as the type-dependent max error.
3640
3641 2023-02-23 Matthias Kretz <m.kretz@gsi.de>
3642
3643 * include/experimental/bits/simd_builtin.h (_S_set): Compare as
3644 int. The actual range of these indexes is very small.
3645
3646 2023-02-23 Matthias Kretz <m.kretz@gsi.de>
3647
3648 * include/experimental/bits/simd_x86.h (_S_bit_shift_left)
3649 (_S_bit_shift_right): Declare constexpr. The implementation was
3650 already expecting constexpr evaluation.
3651
3652 2023-02-23 Matthias Kretz <m.kretz@gsi.de>
3653
3654 PR libstdc++/108030
3655 * include/experimental/bits/simd_detail.h
3656 (_GLIBCXX_SIMD_ALWAYS_INLINE_LAMBDA): Define as empty for
3657 __clang__.
3658
3659 2023-02-23 Matthias Kretz <m.kretz@gsi.de>
3660
3661 PR libstdc++/108030
3662 * include/experimental/bits/simd.h (__vector_broadcast):
3663 Implement via __vector_broadcast_impl instead of
3664 __call_with_n_evaluations + 2 lambdas.
3665 (__vector_broadcast_impl): New.
3666
3667 2023-02-22 Alexandre Oliva <oliva@adacore.com>
3668
3669 * src/c++11/shared_ptr.cc (__gnu_internal::get_mutex):
3670 Avoid destruction of the mutex pool.
3671
3672 2023-02-22 Alexandre Oliva <oliva@adacore.com>
3673
3674 * testsuite/27_io/basic_ofstream/open/char/noreplace.cc: xfail
3675 on vxworks.
3676 * testsuite/27_io/basic_ofstream/open/wchar_t/noreplace.cc:
3677 Likewise.
3678
3679 2023-02-22 Alexandre Oliva <oliva@adacore.com>
3680
3681 * testsuite/17_intro/names.cc: Undef func on vxworks >= 7 in
3682 kernel mode.
3683
3684 2023-02-20 Andreas Schwab <schwab@linux-m68k.org>
3685
3686 * config/abi/post/m68k-linux-gnu/baseline_symbols.txt: Update.
3687
3688 2023-02-20 Matthias Kretz <m.kretz@gsi.de>
3689
3690 * include/experimental/bits/simd.h (__extract_part, split):
3691 Use reserved name for template parameter.
3692
3693 2023-02-20 Andreas Schwab <schwab@suse.de>
3694
3695 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: Update.
3696
3697 2023-02-18 Gerald Pfeifer <gerald@pfeifer.com>
3698
3699 * doc/xml/faq.xml: Switch two links to www.open-std.org to https.
3700 * doc/html/faq.html: Regenerate.
3701
3702 2023-02-16 Matthias Kretz <m.kretz@gsi.de>
3703
3704 * include/experimental/bits/simd_math.h (__hypot): Bitcasting
3705 between scalars requires the __bit_cast helper function instead
3706 of simd_bit_cast.
3707
3708 2023-02-16 Matthias Kretz <m.kretz@gsi.de>
3709
3710 * include/experimental/bits/simd_x86.h
3711 (_SimdImplX86::_S_not_equal_to, _SimdImplX86::_S_less)
3712 (_SimdImplX86::_S_less_equal): Do not call
3713 __builtin_is_constant_evaluated in constexpr-if.
3714
3715 2023-02-16 Matthias Kretz <m.kretz@gsi.de>
3716
3717 * testsuite/experimental/simd/tests/bits/verify.h
3718 (verify::verify): Use %zx for size_t in format string.
3719
3720 2023-02-16 Matthias Kretz <m.kretz@gsi.de>
3721
3722 * testsuite/experimental/simd/generate_makefile.sh: Generate and
3723 pre-compile pch.h, which includes all headers that do not depend
3724 on command-line macros.
3725 * testsuite/experimental/simd/tests/bits/main.h: New file.
3726 (iterate_abis, main): Moved from verify.h.
3727 * testsuite/experimental/simd/tests/bits/verify.h
3728 (iterate_abis, main): Moved to main.h.
3729 * testsuite/experimental/simd/tests/bits/conversions.h: Add
3730 include guard.
3731 (genHalfBits): Simplify.
3732 * testsuite/experimental/simd/tests/bits/make_vec.h: Add include
3733 guard.
3734 (make_alternating_mask): Moved from mask_loadstore.
3735 * testsuite/experimental/simd/tests/bits/mathreference.h: Add
3736 include guard.
3737 * testsuite/experimental/simd/tests/bits/test_values.h: Ditto.
3738 * testsuite/experimental/simd/tests/mask_loadstore.cc
3739 (make_mask, make_alternating_mask): Removed.
3740 * testsuite/experimental/simd/tests/mask_reductions.cc: Ditto.
3741 * testsuite/experimental/simd/tests/operators.cc (genHalfBits):
3742 Removed.
3743 * testsuite/experimental/simd/tests/abs.cc: Only include
3744 bits/main.h.
3745 Ditto.
3746 * testsuite/experimental/simd/tests/algorithms.cc: Ditto.
3747 * testsuite/experimental/simd/tests/broadcast.cc: Ditto.
3748 * testsuite/experimental/simd/tests/casts.cc: Ditto.
3749 * testsuite/experimental/simd/tests/fpclassify.cc: Ditto.
3750 * testsuite/experimental/simd/tests/frexp.cc: Ditto.
3751 * testsuite/experimental/simd/tests/generator.cc: Ditto.
3752 * testsuite/experimental/simd/tests/hypot3_fma.cc: Ditto.
3753 * testsuite/experimental/simd/tests/integer_operators.cc: Ditto.
3754 * testsuite/experimental/simd/tests/ldexp_scalbn_scalbln_modf.cc:
3755 * testsuite/experimental/simd/tests/loadstore.cc: Ditto.
3756 * testsuite/experimental/simd/tests/logarithm.cc: Ditto.
3757 * testsuite/experimental/simd/tests/mask_broadcast.cc: Ditto.
3758 * testsuite/experimental/simd/tests/mask_conversions.cc: Ditto.
3759 * testsuite/experimental/simd/tests/mask_implicit_cvt.cc: Ditto.
3760 * testsuite/experimental/simd/tests/mask_operator_cvt.cc: Ditto.
3761 * testsuite/experimental/simd/tests/mask_operators.cc: Ditto.
3762 * testsuite/experimental/simd/tests/math_1arg.cc: Ditto.
3763 * testsuite/experimental/simd/tests/math_2arg.cc: Ditto.
3764 * testsuite/experimental/simd/tests/operator_cvt.cc: Ditto.
3765 * testsuite/experimental/simd/tests/reductions.cc: Ditto.
3766 * testsuite/experimental/simd/tests/remqo.cc: Ditto.
3767 * testsuite/experimental/simd/tests/simd.cc: Ditto.
3768 * testsuite/experimental/simd/tests/sincos.cc: Ditto.
3769 * testsuite/experimental/simd/tests/split_concat.cc: Ditto.
3770 * testsuite/experimental/simd/tests/splits.cc: Ditto.
3771 * testsuite/experimental/simd/tests/trigonometric.cc: Ditto.
3772 * testsuite/experimental/simd/tests/trunc_ceil_floor.cc: Ditto.
3773 * testsuite/experimental/simd/tests/where.cc: Ditto.
3774
3775 2023-02-16 Matthias Kretz <m.kretz@gsi.de>
3776
3777 * testsuite/experimental/simd/README.md: Document the timeout
3778 and timeout-factor directives. Minor typo fixed.
3779
3780 2023-02-16 Matthias Kretz <m.kretz@gsi.de>
3781
3782 PR libstdc++/108030
3783 * include/experimental/bits/simd_detail.h: Define
3784 _GLIBCXX_SIMD_ALWAYS_INLINE_LAMBDA.
3785 * include/experimental/bits/simd.h: Annotate lambdas with
3786 _GLIBCXX_SIMD_ALWAYS_INLINE_LAMBDA.
3787 * include/experimental/bits/simd_builtin.h: Ditto.
3788 * include/experimental/bits/simd_converter.h: Ditto.
3789 * include/experimental/bits/simd_fixed_size.h: Ditto.
3790 * include/experimental/bits/simd_math.h: Ditto.
3791 * include/experimental/bits/simd_neon.h: Ditto.
3792 * include/experimental/bits/simd_x86.h: Ditto.
3793
3794 2023-02-16 Matthias Kretz <m.kretz@gsi.de>
3795
3796 * include/experimental/bits/simd.h
3797 (_SimdWrapper::_M_is_constprop_none_of)
3798 (_SimdWrapper::_M_is_constprop_all_of): Return false unless the
3799 computed result still satisfies __builtin_constant_p.
3800
3801 2023-02-16 Jonathan Wakely <jwakely@redhat.com>
3802
3803 * testsuite/std/format/arguments/lwg3810.cc: Replace UTF-8
3804 ellipsis character.
3805
3806 2023-02-16 Jonathan Wakely <jwakely@redhat.com>
3807
3808 * include/Makefile.am: Add new header.
3809 * include/Makefile.in: Regenerate.
3810 * include/experimental/synchronized_value: New file.
3811 * testsuite/experimental/synchronized_value.cc: New test.
3812
3813 2023-02-16 Jonathan Wakely <jwakely@redhat.com>
3814
3815 * include/experimental/optional: Fix header name in comment.
3816
3817 2023-02-16 Jonathan Wakely <jwakely@redhat.com>
3818
3819 * include/std/format (__format::_Arg_store): New class template.
3820 (basic_format_args): Remove nested type _Store and add deduction
3821 guide from _Arg_store.
3822 (basic_format_arg, make_format_args): Adjust.
3823 * testsuite/std/format/arguments/lwg3810.cc: New test.
3824
3825 2023-02-16 Jonathan Wakely <jwakely@redhat.com>
3826
3827 * include/bits/stl_pair.h (pair) [C++20]: Add non-dangling
3828 constraints to constructors and add deleted overloads for the
3829 dangling cases, as per P2255R2.
3830 (pair) [!C++20 && _GLIBCXX_DEBUG]: Add static assertions to
3831 make dangling cases ill-formed.
3832 * testsuite/20_util/pair/dangling_ref.cc: New test.
3833
3834 2023-02-16 Jonathan Wakely <jwakely@redhat.com>
3835
3836 * testsuite/17_intro/names_pstl.cc: Require et tbb_backend.
3837
3838 2023-02-16 Jonathan Wakely <jwakely@redhat.com>
3839
3840 * include/ext/throw_allocator.h: Use reserved names for
3841 parameters.
3842
3843 2023-02-16 Jonathan Wakely <jwakely@redhat.com>
3844
3845 * testsuite/17_intro/names_pstl.cc: Add space after effective
3846 target name.
3847
3848 2023-02-16 Jonathan Wakely <jwakely@redhat.com>
3849
3850 * include/pstl/algorithm_fwd.h (__pattern_search_n)
3851 (__brick_unique_copy, __brick_adjacent_find)
3852 (__brick_generate_n, __pattern_generate_n): Use reserved names
3853 for parameters.
3854 * include/pstl/algorithm_impl.h (__brick_unique_copy)
3855 (__pattern_reverse, __brick_generate_n): Likewise.
3856 * include/pstl/execution_impl.h (__prefer_unsequenced_tag)
3857 (__prefer_parallel_tag): Likewise.
3858 * include/pstl/glue_algorithm_impl.h (transform): Likewise.
3859 * include/pstl/glue_numeric_defs.h (adjacent_difference):
3860 Likewise.
3861 * include/pstl/numeric_impl.h (__brick_adjacent_difference):
3862 Likewise.
3863 * include/pstl/parallel_backend_tbb.h (__merge_func): Likewise.
3864 * include/pstl/unseq_backend_simd.h (_Combiner)
3865 (__simd_min_element, __simd_minmax_element): Likewise.
3866 * testsuite/17_intro/names_pstl.cc: New test.
3867
3868 2023-02-16 Jonathan Wakely <jwakely@redhat.com>
3869
3870 * include/bits/fs_ops.h (create_directory): Use reserved name
3871 for parameter.
3872 * include/bits/ranges_algo.h (__contains_subrange_fn):
3873 Likewise.
3874 * include/bits/regex_automaton.h (_State_base::_M_print):
3875 Likewise.
3876 * include/bits/regex_automaton.tcc(_State_base::_M_print):
3877 Likewise.
3878 * include/bits/regex_scanner.tcc(_Scanner::_M_print): Likewise.
3879 * include/experimental/bits/fs_ops.h (create_directory):
3880 Likewise.
3881 * include/std/mutex (timed_mutex::_M_clocklock): Likewise.
3882 (recursive_timed_mutex:_M_clocklock): Likewise.
3883 * include/std/tuple (basic_common_reference): Likewise.
3884 * libsupc++/cxxabi_init_exception.h
3885 (__cxa_init_primary_exception): Likewise.
3886 * testsuite/17_intro/names.cc: Add checks.
3887
3888 2023-02-14 Gerald Pfeifer <gerald@pfeifer.com>
3889
3890 * doc/xml/manual/status_cxx2017.xml: Update an open-std.org link
3891 to www.open-std.org and https.
3892 * doc/html/manual/status.html: Regenerate.
3893
3894 2023-02-14 Thomas W Rodgers <rodgert@twrodgers.com>
3895
3896 PR libstdc++/103934
3897 * include/std/atomic (atomic_flag_wait): Add.
3898 (atomic_flag_wait_explicit): Add.
3899 (atomic_flag_notify): Add.
3900 (atomic_flag_notify_explicit): Add.
3901 * testsuite/29_atomics/atomic_flag/wait_notify/1.cc:
3902 Add test case to cover missing atomic_flag free functions.
3903
3904 2023-02-14 Thomas W Rodgers <rodgert@twrodgers.com>
3905
3906 PR libstdc++/103934
3907 * include/std/atomic (atomic_flag_test): Add.
3908 (atomic_flag_test_explicit): Add.
3909 * testsuite/29_atomics/atomic_flag/test/explicit.cc: Add
3910 test case to cover missing atomic_flag free functions.
3911 * testsuite/29_atomics/atomic_flag/test/implicit.cc:
3912 Likewise.
3913
3914 2023-02-13 Gerald Pfeifer <gerald@pfeifer.com>
3915
3916 * doc/xml/manual/policy_data_structures_biblio.xml: Adjust
3917 "The Component Object Model" reference.
3918 * doc/html/manual/policy_data_structures.html: Regenerate.
3919
3920 2023-02-12 Gerald Pfeifer <gerald@pfeifer.com>
3921
3922 * doc/xml/manual/containers.xml: Tweak a link to N1780
3923 (C++ standard).
3924 * doc/html/manual/associative.html: Regenerate.
3925
3926 2023-02-12 Gerald Pfeifer <gerald@pfeifer.com>
3927
3928 * doc/xml/manual/ctype.xml: Change www.unix.org to unix.org.
3929 * doc/html/manual/facets.html: Regenerate.
3930
3931 2023-02-11 Gerald Pfeifer <gerald@pfeifer.com>
3932
3933 * doc/xml/manual/policy_data_structures_biblio.xml: Update
3934 link to "Worst-case efficient priority queues".
3935 * doc/html/manual/policy_data_structures.html: Regenerate.
3936
3937 2023-02-06 Arsen Arsenović <arsen@aarsen.me>
3938
3939 * doc/xml/manual/using.xml: Document newly-freestanding
3940 headers and the effect of the -ffreestanding flag.
3941 * doc/xml/manual/status_cxx2023.xml: Document P1642R11 as
3942 completed.
3943 * doc/xml/manual/configure.xml: Document that hosted installs
3944 respect __STDC_HOSTED__.
3945 * doc/xml/manual/test.xml: Document how to run tests in
3946 freestanding mode.
3947 * doc/html/*: Regenerate.
3948
3949 2023-02-06 Jonathan Wakely <jwakely@redhat.com>
3950
3951 * include/bits/ranges_algo.h (__find_last_fn): Rename T to _Tp.
3952 (__find_last_if_fn): Likewise.
3953
3954 2023-02-06 Jonathan Wakely <jwakely@redhat.com>
3955
3956 * include/std/type_traits: Add diagnostic pragmas around
3957 references to deprecated std::aligned_storage and
3958 std::aligned_union traits.
3959 * testsuite/20_util/aligned_storage/requirements/alias_decl.cc:
3960 Add dg-warning for et c++23.
3961 * testsuite/20_util/aligned_storage/requirements/explicit_instantiation.cc:
3962 Likewise.
3963 * testsuite/20_util/aligned_storage/value.cc: Likewise.
3964 * testsuite/20_util/aligned_union/1.cc: Likewise.
3965 * testsuite/20_util/aligned_union/requirements/alias_decl.cc:
3966 Likewise.
3967
3968 2023-02-06 Nathaniel Shead <nathanieloshead@gmail.com>
3969
3970 * doc/doxygen/user.cfg.in (PREDEFINED): Add new macros.
3971 * include/bits/c++config (_GLIBCXX23_DEPRECATED)
3972 (_GLIBCXX23_DEPRECATED_SUGGEST): New macros.
3973 * include/std/type_traits (aligned_storage, aligned_union)
3974 (aligned_storage_t, aligned_union_t): Deprecate for C++23.
3975 * testsuite/20_util/aligned_storage/deprecated-2b.cc: New test.
3976 * testsuite/20_util/aligned_union/deprecated-2b.cc: New test.
3977
3978 2023-02-06 Nathaniel Shead <nathanieloshead@gmail.com>
3979
3980 * doc/doxygen/user.cfg.in (PREDEFINED): Update macros.
3981 * include/bits/c++config (_GLIBCXX20_DEPRECATED): Make
3982 consistent with other 'deprecated' macros.
3983 * include/std/type_traits (is_pod, is_pod_v): Use
3984 _GLIBCXX20_DEPRECATED_SUGGEST instead.
3985
3986 2023-02-06 Arsen Arsenović <arsen@aarsen.me>
3987
3988 * Makefile.am [!_GLIBCXX_HOSTED]: Enable src/ subdirectory.
3989 * Makefile.in: Regenerate.
3990 * src/Makefile.am [!_GLIBCXX_HOSTED]: Omit compatibility files.
3991 There's no history to be compatible with.
3992 * src/c++11/Makefile.am [!_GLIBCXX_HOSTED]: Omit hosted-only
3993 source files from the build.
3994 * src/c++17/Makefile.am [!_GLIBCXX_HOSTED]: Likewise.
3995 * src/c++20/Makefile.am [!_GLIBCXX_HOSTED]: Likewise.
3996 * src/c++98/Makefile.am [!_GLIBCXX_HOSTED]: Likewise.
3997 * src/Makefile.in: Regenerate.
3998 * src/c++11/Makefile.in: Regenerate.
3999 * src/c++17/Makefile.in: Regenerate.
4000 * src/c++20/Makefile.in: Regenerate.
4001 * src/c++98/Makefile.in: Regenerate.
4002
4003 2023-02-06 Jonathan Wakely <jwakely@redhat.com>
4004
4005 * src/Makefile.am [GLIBCXX_HOSTED] (SUBDIRS): Do not add
4006 filesystem, libbacktrace and experimental.
4007 * src/Makefile.in: Regenerate.
4008
4009 2023-02-04 Hans-Peter Nilsson <hp@axis.com>
4010
4011 PR libstdc++/108672
4012 * include/pstl/unseq_backend_simd.h (__simd_or): Use __INT32_TYPE__
4013 instead of int32_t.
4014
4015 2023-02-04 Gerald Pfeifer <gerald@pfeifer.com>
4016
4017 * doc/xml/manual/documentation_hacking.xml: Adjust link to pdftex.
4018 * doc/html/manual/documentation_hacking.html: Regenerate.
4019
4020 2023-02-04 François Dumont <fdumont@gcc.gnu.org>
4021
4022 * include/bits/basic_string.h (operator=(basic_string&&)): Transfer move-to
4023 storage to the move-from instance when allocators are equal.
4024 * testsuite/21_strings/basic_string/allocator/char/move_assign.cc (test04):
4025 New test case.
4026
4027 2023-02-03 Samuel Thibault <samuel.thibault@gnu.org>
4028
4029 * config/os/gnu-linux/os_defines.h [!__linux__]
4030 (_GLIBCXX_NATIVE_THREAD_ID, _GLIBCXX_GTHREAD_USE_WEAK): Do not define.
4031
4032 2023-02-03 Patrick Palka <ppalka@redhat.com>
4033
4034 * include/bits/ranges_algo.h (__find_last_fn, find_last):
4035 Define.
4036 (__find_last_if_fn, find_last_if): Define.
4037 (__find_last_if_not_fn, find_last_if_not): Define.
4038 * testsuite/25_algorithms/find_last/1.cc: New test.
4039 * testsuite/25_algorithms/find_last_if/1.cc: New test.
4040 * testsuite/25_algorithms/find_last_if_not/1.cc: New test.
4041
4042 2023-02-03 Patrick Palka <ppalka@redhat.com>
4043
4044 * include/bits/ranges_algo.h (out_value_result): Define.
4045 (iota_result): Define.
4046 (__iota_fn, iota): Define.
4047 * testsuite/25_algorithms/iota/1.cc: New test.
4048
4049 2023-02-03 Patrick Palka <ppalka@redhat.com>
4050
4051 * include/bits/ranges_algo.h (__contains_fn, contains): Define.
4052 (__contains_subrange_fn, contains_subrange): Define.
4053 * testsuite/25_algorithms/contains/1.cc: New test.
4054 * testsuite/25_algorithms/contains_subrange/1.cc: New test.
4055
4056 2023-02-02 Gerald Pfeifer <gerald@pfeifer.com>
4057
4058 * doc/xml/manual/abi.xml: Tweak link to ABIcheck project.
4059 * doc/html/manual/abi.html: Regenerate.
4060
4061 2023-02-02 Jonathan Wakely <jwakely@redhat.com>
4062
4063 * src/filesystem/ops-common.h [AVR] (__unsupported): Always use
4064 errc::function_not_supported instead of errc::not_supported.
4065
4066 2023-02-02 Jonathan Wakely <jwakely@redhat.com>
4067
4068 * include/std/sstream (basic_stringbuf::view): Define for old
4069 std::string ABI.
4070 (basic_istringstream::view, basic_0stringstream::view)
4071 (basic_stringstream::view): Likewise.
4072 * testsuite/27_io/basic_istringstream/view/char/1.cc: Remove
4073 { dg-require-effective-target cxx11_abi }.
4074 * testsuite/27_io/basic_istringstream/view/wchar_t/1.cc:
4075 Likewise.
4076 * testsuite/27_io/basic_ostringstream/view/char/1.cc: Likewise.
4077 * testsuite/27_io/basic_ostringstream/view/wchar_t/1.cc:
4078 Likewise.
4079 * testsuite/27_io/basic_stringbuf/view/char/1.cc: Likewise.
4080 * testsuite/27_io/basic_stringbuf/view/wchar_t/1.cc: Likewise.
4081 * testsuite/27_io/basic_stringstream/view/char/1.cc: Likewise.
4082 * testsuite/27_io/basic_stringstream/view/wchar_t/1.cc:
4083 Likewise.
4084
4085 2023-02-02 Jonathan Wakely <jwakely@redhat.com>
4086
4087 PR libstdc++/108636
4088 * config/abi/pre/gnu.ver (GLIBCXX_3.4.31): Export shared_ptr
4089 conversion operators for directory iterator comparisons with
4090 std::default_sentinel_t.
4091 * include/bits/fs_path.h (path::path(string_view, _Type))
4092 (path::_Cmpt::_Cmpt(string_view, _Type, size_t)): Move inline
4093 definitions to ...
4094 * src/c++17/fs_path.cc: ... here.
4095 * testsuite/27_io/filesystem/path/108636.cc: New test.
4096
4097 2023-02-02 Jonathan Wakely <jwakely@redhat.com>
4098
4099 * include/std/variant (variant::operator=): Implement resolution
4100 of LWG 3585.
4101 * testsuite/20_util/variant/lwg3585.cc: New test.
4102
4103 2023-02-02 Gerald Pfeifer <gerald@pfeifer.com>
4104
4105 * doc/xml/manual/using_exceptions.xml: Update a www.open-std.org
4106 link to https.
4107 * doc/html/manual/using_exceptions.html: Regenerate.
4108
4109 2023-02-02 Gerald Pfeifer <gerald@pfeifer.com>
4110
4111 * doc/xml/manual/debug.xml: Fix link to online GDB manual.
4112 * doc/html/manual/debug.html: Regenerate.
4113
4114 2023-02-01 Jonathan Wakely <jwakely@redhat.com>
4115
4116 * src/c++11/random.cc (random_device::_M_fini): Do not try to
4117 close the file handle if the target doesn't support the
4118 /dev/random and /dev/urandom files.
4119
4120 2023-02-01 Jonathan Wakely <jwakely@redhat.com>
4121
4122 * config/os/generic/error_constants.h (errc::value_too_large)
4123 [__AVR__]: Define.
4124 * src/c++11/system_error.cc
4125 (system_category::default_error_condition) [__AVR__]: Only match
4126 recognize values equal to EDOM, ERANGE, ENOSYS and EINTR.
4127 * src/c++17/fs_ops.cc (fs::current_path) [__AVR__]: Do not check
4128 for ENOENT etc. in switch.
4129 (fs::remove_all) [__AVR__]: Likewise.
4130 * src/filesystem/ops-common.h [__AVR__]: Do not use POSIX open,
4131 close etc.
4132
4133 2023-02-01 Jonathan Wakely <jwakely@redhat.com>
4134
4135 * acinclude.m4 (GLIBCXX_ZONEINFO_DIR) [avr-*-*, msp430-*-*]: Set
4136 embed_zoneinfo=no
4137 * configure: Regenerate.
4138
4139 2023-02-01 Hans-Peter Nilsson <hp@axis.com>
4140
4141 PR testsuite/108632
4142 * testsuite/std/time/hh_mm_ss/1.cc (size): Add empty
4143 struct at end of S0.
4144
4145 2023-01-30 Gerald Pfeifer <gerald@pfeifer.com>
4146
4147 * doc/xml/manual/shared_ptr.xml: Move links from both
4148 http://open-std.org and http://www.open-std.org to
4149 https://www.open-std.org.
4150 * doc/html/manual/memory.html: Regenerate.
4151
4152 2023-01-28 Gerald Pfeifer <gerald@pfeifer.com>
4153
4154 * doc/xml/manual/appendix_contributing.xml: Adjust link to
4155 ISO C++ standard at ANSI.
4156 Move link to www.open-std.org to https.
4157 * doc/html/manual/appendix_contributing.html: Regenerate.
4158
4159 2023-01-28 Gerald Pfeifer <gerald@pfeifer.com>
4160
4161 * doc/xml/manual/documentation_hacking.xml: Move sourceforge.net
4162 links to https.
4163 * doc/html/manual/documentation_hacking.html: Regenerate.
4164
4165 2023-01-28 Gerald Pfeifer <gerald@pfeifer.com>
4166
4167 * doc/xml/manual/abi.xml: Update www.open-std.org link to https.
4168 * doc/html/manual/abi.html: Regenerate.
4169
4170 2023-01-27 Jakub Jelinek <jakub@redhat.com>
4171
4172 PR libstdc++/108568
4173 * testsuite/17_intro/names.cc (__unused): For linux or GNU hurd
4174 include features.h if present and then check __GLIBC__ and
4175 __GLIBC_MINOR__ macros for glibc prior to 2.19, instead of testing
4176 __GLIBC_PREREQ which isn't defined yet.
4177
4178 2023-01-27 Jonathan Wakely <jwakely@redhat.com>
4179
4180 * src/c++20/tzdb.cc (tzdata_stream): Use constant instead of
4181 string literal.
4182
4183 2023-01-27 Jonathan Wakely <jwakely@redhat.com>
4184
4185 PR libstdc++/108554
4186 * testsuite/23_containers/map/modifiers/108554.cc: Use dg-bogus.
4187
4188 2023-01-26 Jonathan Wakely <jwakely@redhat.com>
4189
4190 * src/c++20/tzdb.cc (operator>>(istream&, ZoneInfo&)): Allow
4191 rules named "+" for compatibility with older tzdata.zi files.
4192
4193 2023-01-26 Jonathan Wakely <jwakely@redhat.com>
4194
4195 PR libstdc++/108554
4196 * include/bits/stl_tree.h (_Rb_tree_insert_and_rebalance): Add
4197 nonnull attribute.
4198 (_Rb_tree_rebalance_for_erase): Add nonnull and returns_nonnull
4199 attributes.
4200 * testsuite/23_containers/map/modifiers/108554.cc: New test.
4201
4202 2023-01-26 Jonathan Wakely <jwakely@redhat.com>
4203
4204 PR libstdc++/108530
4205 * src/c++20/tzdb.cc (current_zone): Look for TIMEZONE or ZONE in
4206 /etc/sysconfig/clock, not DEFAULT_TIMEZONE.
4207
4208 2023-01-26 Gerald Pfeifer <gerald@pfeifer.com>
4209
4210 * doc/xml/manual/intro.xml: Update links to www.open-std.org to
4211 use https.
4212 * doc/html/manual/bugs.html: Regenerate.
4213
4214 2023-01-24 Jonathan Wakely <jwakely@redhat.com>
4215
4216 PR libstdc++/108530
4217 * src/c++20/tzdb.cc (current_zone): Look for DEFAULT_TIMEZONE in
4218 /etc/sysconfig/clock.
4219
4220 2023-01-24 Jonathan Wakely <jwakely@redhat.com>
4221
4222 PR libstdc++/102301
4223 * include/bits/ranges_base.h: Include <bits/stl_iterator.h> for
4224 std::make_reverse_iterator.
4225 * include/std/tuple: Include <bits/ranges_util.h> for subrange.
4226 (make_from_tuple): Add static assertion from P2255 to diagnose
4227 dangling references.
4228 * testsuite/20_util/tuple/make_from_tuple/dangling_ref.cc: New test.
4229 * testsuite/20_util/tuple/make_from_tuple/tuple_like.cc: New test.
4230
4231 2023-01-23 François Dumont <fdumont@gcc.gnu.org>
4232
4233 * include/debug/safe_iterator.h (_Safe_iterator<>::_Unchecked): New.
4234 (_Safe_iterator(const _Safe_iterator&, _Unchecked)): New.
4235 (_Safe_iterator::operator++(int)): Use latter.
4236 (_Safe_iterator::operator--(int)): Likewise.
4237 (_Safe_iterator(_Iterator, const _Safe_sequence_base*)): Remove !_M_insular()
4238 check.
4239 * include/debug/safe_local_iterator.h (_Safe_local_iterator<>::_Unchecked):
4240 New.
4241 (_Safe_local_iterator(const _Safe_local_iterator&, _Unchecked)): New.
4242 (_Safe_local_iterator::operator++(int)): Use latter.
4243 * src/c++11/debug.cc (_S_debug_messages): Add as comment the _Debug_msg_id
4244 entry associated to the array entry.
4245
4246 2023-01-18 Jonathan Wakely <jwakely@redhat.com>
4247
4248 * include/bits/fs_path.h (u8path): Add deprecated attribute.
4249 * testsuite/27_io/filesystem/path/construct/90281.cc: Add
4250 -Wno-deprecated-declarations for C++20 and later.
4251 * testsuite/27_io/filesystem/path/factory/u8path-char8_t.cc:
4252 Likewise.
4253 * testsuite/27_io/filesystem/path/factory/u8path.cc: Likewise.
4254 * testsuite/27_io/filesystem/path/native/string.cc: Likewise.
4255 * testsuite/27_io/filesystem/path/factory/u8path-depr.cc: New test.
4256
4257 2023-01-18 Jonathan Wakely <jwakely@redhat.com>
4258
4259 * include/bits/random.h (random_device) [!_GLIBCXX_USE_DEV_RANDOM]:
4260 Always call _M_fini and _M_getentropy.
4261
4262 2023-01-18 Gerald Pfeifer <gerald@pfeifer.com>
4263
4264 * doc/xml/manual/policy_data_structures_biblio.xml: Adjust links
4265 to www.open-std.org to use https.
4266 (COM: Component Model Object Technologies): Rename from...
4267 (The Component Object Model): ...to.
4268 * doc/html/manual/policy_data_structures.html: Regenerate.
4269
4270 2023-01-18 Dimitrij Mijoski <dmjpp@hotmail.com>
4271
4272 * testsuite/22_locale/codecvt/codecvt_unicode.cc: Simplify.
4273 * testsuite/22_locale/codecvt/codecvt_unicode.h: Simplify.
4274 * testsuite/22_locale/codecvt/codecvt_unicode_wchar_t.cc: Simplify.
4275
4276 2023-01-17 Jonathan Wakely <jwakely@redhat.com>
4277
4278 * acinclude.m4 (GLIBCXX_ZONEINFO_DIR): Check $target_os instead
4279 of $host. Fix check for file being present during native build.
4280 * configure: Regenerate.
4281
4282 2023-01-17 Martin Liska <mliska@suse.cz>
4283
4284 * src/libbacktrace/Makefile.in: Regenerate.
4285
4286 2023-01-16 Jonathan Wakely <jwakely@redhat.com>
4287
4288 * src/c++20/tzdb.cc (_GLIBCXX_USE_CXX11_ABI): Define to 1.
4289
4290 2023-01-16 Jonathan Wakely <jwakely@redhat.com>
4291
4292 PR libstdc++/108413
4293 * include/c_compatibility/stdatomic.h: Change copyright line to
4294 be consistent with other headers contributed under DCO terms.
4295 * include/std/expected: Add full stop to copyright line.
4296 * src/c++20/tzdb.cc: Likewise.
4297
4298 2023-01-15 Gerald Pfeifer <gerald@pfeifer.com>
4299
4300 * doc/xml/manual/status_cxx2014.xml: Switch www.open-std.org to
4301 https.
4302 * doc/xml/manual/status_cxx2017.xml: Ditto.
4303 * doc/xml/manual/status_cxx2020.xml: Ditto.
4304 * doc/xml/manual/status_cxx2023.xml: Ditto.
4305 * doc/html/manual/status.html: Regenerate.
4306
4307 2023-01-15 Jonathan Wakely <jwakely@redhat.com>
4308
4309 * testsuite/std/time/tzdb_list/1.cc: Remove dg-xfail-run-if
4310 and fail gracefully if defining the weak symbol doesn't work.
4311
4312 2023-01-15 François Dumont <fdumont@gcc.gnu.org>
4313
4314 PR libstdc++/108288
4315 * include/debug/safe_iterator.h (_Safe_iterator<>::operator++(int)): Extend deadlock
4316 fix to other iterator category.
4317 (_Safe_iterator<>::operator--(int)): Likewise.
4318 * include/debug/safe_local_iterator.h (_Safe_local_iterator<>::operator++(int)):
4319 Fix deadlock.
4320 * testsuite/util/debug/unordered_checks.h (invalid_local_iterator_pre_increment): New.
4321 (invalid_local_iterator_post_increment): New.
4322 * testsuite/23_containers/unordered_map/debug/invalid_local_iterator_post_increment_neg.cc:
4323 New test.
4324 * testsuite/23_containers/unordered_map/debug/invalid_local_iterator_pre_increment_neg.cc:
4325 New test.
4326
4327 2023-01-15 Jonathan Wakely <jwakely@redhat.com>
4328
4329 * testsuite/30_threads/jthread/jthread.cc: Remove -pthread from
4330 dg-options.
4331
4332 2023-01-15 Jonathan Wakely <jwakely@redhat.com>
4333
4334 * testsuite/std/time/clock/utc/io.cc: Use ctype to widen char.
4335
4336 2023-01-14 Björn Schäpers <bjoern@hazardy.de>
4337
4338 * acinclude.m4 (GLIBCXX_ENABLE_BACKTRACE): Add check for
4339 windows.h. Add pecoff as FORMAT_FILE.
4340 * config.h.in: Regenerate.
4341 * configure: Regenerate.
4342 * src/libbacktrace/Makefile.am: Regenerate.
4343 * src/libbacktrace/Makefile.in: Add pecoff.c as FORMAT_FILE.
4344
4345 2023-01-14 Björn Schäpers <bjoern@hazardy.de>
4346
4347 * include/std/stacktrace (stacktrace_entry::_S_demangle): Use
4348 raw __name if __cxa_demangle could not demangle it.
4349
4350 2023-01-14 Jonathan Wakely <jwakely@redhat.com>
4351
4352 PR libstdc++/108409
4353 * src/c++20/tzdb.cc (current_zone()) [_AIX]: Use TZ environment
4354 variable.
4355
4356 2023-01-14 Jonathan Wakely <jwakely@redhat.com>
4357
4358 * src/c++20/tzdb.cc (TZDB_DISABLED): Disable all code for
4359 loading tzdb.
4360 * testsuite/std/time/tzdb/leap_seconds.cc: Require tzdb
4361 effective target.
4362 * testsuite/std/time/tzdb_list/1.cc: Likewise.
4363
4364 2023-01-14 Jonathan Wakely <jwakely@redhat.com>
4365
4366 * acinclude.m4 (GLIBCXX_ZONEINFO_DIR): Replace the
4367 --with-libstdcxx-zoneinfo-dir configure option with
4368 --with-libstdcxx-zoneinfo with yes/no/static choices as well as
4369 a directory.
4370 * config.h.in: Regenerate.
4371 * configure: Regenerate.
4372 * doc/xml/manual/configure.xml: Document configure option.
4373 * doc/html/manual/configure.html: Regenerate.
4374 * src/c++20/Makefile.am: Generate tzdata.zi.h header.
4375 * src/c++20/Makefile.in: Regenerate.
4376 * src/c++20/tzdb.cc (__gnu_cxx::zoneinfo_dir_override): Return a
4377 null pointer if no directory is configured.
4378 (zoneinfo_dir): Replace with ...
4379 (zoneinfo_file): New function.
4380 (tzdata_stream): New istream class.
4381 (remote_version, reload_tzdb): Use tzdata_stream.
4382 * testsuite/lib/libstdc++.exp (check_effective_target_tzdb):
4383 Check new _GLIBCXX_STATIC_TZDATA macro and ignore presence of
4384 tzdata.zi file in default location.
4385 * src/c++20/tzdata.zi: New file.
4386
4387 2023-01-14 Jonathan Wakely <jwakely@redhat.com>
4388
4389 * include/bits/chrono_io.h (operator<<): Fix syntax errors.
4390 * testsuite/std/time/month_day/io.cc: New test.
4391 * testsuite/std/time/month_day_last/io.cc: New test.
4392 * testsuite/std/time/month_weekday/io.cc: New test.
4393 * testsuite/std/time/month_weekday_last/io.cc: New test.
4394 * testsuite/std/time/weekday_indexed/io.cc: New test.
4395 * testsuite/std/time/weekday_last/io.cc: New test.
4396 * testsuite/std/time/year_month/io.cc: New test.
4397 * testsuite/std/time/year_month_day_last/io.cc: New test.
4398 * testsuite/std/time/year_month_weekday/io.cc: New test.
4399 * testsuite/std/time/year_month_weekday_last/io.cc: New test.
4400
4401 2023-01-14 François Dumont <fdumont@gcc.gnu.org>
4402
4403 * include/std/format [_GLIBCXX_INLINE_VERSION](to_chars): Adapt __asm symbol
4404 specifications.
4405 * config/abi/pre/gnu-versioned-namespace.ver: Add to_chars/from_chars symbols
4406 export.
4407
4408 2023-01-13 Jonathan Wakely <jwakely@redhat.com>
4409
4410 * include/bits/std_mutex.h: Include <errno.h>.
4411
4412 2023-01-13 Arsen Arsenović <arsen@aarsen.me>
4413
4414 * testsuite/20_util/to_chars/version.cc: Mark hosted-only.
4415 * testsuite/20_util/uses_allocator/lwg3677.cc: Ditto.
4416 * testsuite/20_util/weak_ptr/cons/self_move.cc: Ditto.
4417 * testsuite/std/ranges/adaptors/as_rvalue/1.cc: Replace usage of
4418 std::make_unique with a freestanding-compatible wrapper around
4419 unique_ptr.
4420 * testsuite/21_strings/basic_string_view/operations/contains/char.cc:
4421 Don't test for presence of __cpp_lib_string_contains on !HOSTED.
4422 * testsuite/21_strings/basic_string_view/operations/contains/char/2.cc:
4423 Ditto.
4424 * testsuite/std/ranges/version_c++23.cc: Don't test for presence
4425 of __cpp_lib_ranges in !HOSTED.
4426
4427 2023-01-13 Arsen Arsenović <arsen@aarsen.me>
4428
4429 * include/Makefile.am: Install bits/char_traits.h,
4430 std/string_view
4431 * include/Makefile.in: Regenerate.
4432 * include/bits/char_traits.h: Gate hosted-only, wchar-only and
4433 mbstate-only bits behind appropriate #ifs.
4434 * include/std/string_view: Gate <iostream> functionality behind
4435 HOSTED.
4436 * include/std/version: Enable __cpp_lib_constexpr_string_view
4437 and __cpp_lib_starts_ends_with in !HOSTED.
4438 * include/std/ranges: Re-enable __is_basic_string_view on
4439 freestanding, include <string_view> directly.
4440 * include/precompiled/stdc++.h: Include <string_view> when
4441 !HOSTED too.
4442 * testsuite/20_util/function_objects/searchers.cc: Skip testing
4443 boyer_moore searchers on freestanding
4444 * testsuite/21_strings/basic_string_view/capacity/1.cc: Guard
4445 <string>-related tests behind __STDC_HOSTED__.
4446 * testsuite/21_strings/basic_string_view/cons/char/1.cc: Ditto.
4447 * testsuite/21_strings/basic_string_view/cons/char/2.cc: Remove
4448 unused <stdexcept> include.
4449 * testsuite/21_strings/basic_string_view/cons/char/3.cc: Remove
4450 unused <vector> include.
4451 * testsuite/21_strings/basic_string_view/cons/char/range.cc:
4452 Guard <string> related testing behind __STDC_HOSTED__.
4453 * testsuite/21_strings/basic_string_view/cons/wchar_t/1.cc:
4454 Guard <stdexcept> related tests behind __STDC_HOSTED__.
4455 * testsuite/21_strings/basic_string_view/element_access/char/1.cc:
4456 Ditto.
4457 * testsuite/21_strings/basic_string_view/element_access/wchar_t/1.cc:
4458 Guard <stdexcept> tests behind __STDC_HOSTED__.
4459 * testsuite/21_strings/basic_string_view/operations/contains/char/2.cc:
4460 Enable test on freestanding, guard <stdexcept> bits behind
4461 __STDC_HOSTED__.
4462 * testsuite/21_strings/basic_string_view/operations/substr/char.cc:
4463 Guard <stdexcept> bits behind __STDC_HOSTED__.
4464 * testsuite/21_strings/basic_string_view/operations/substr/wchar_t.cc:
4465 Ditto.
4466
4467 2023-01-13 Dimitrij Mijoski <dmjpp@hotmail.com>
4468
4469 PR libstdc++/86419
4470 * src/c++11/codecvt.cc (read_utf8_code_point): Correctly detect
4471 errors in incomplete multibyte sequences.
4472 (utf16_in): Remove surrogates parameter. Fix conditions for
4473 returning partial.
4474 (utf16_out): Fix condition for returning partial.
4475 (ucs2_in): Do not pass surrogates argument to utf16_in.
4476 * testsuite/22_locale/codecvt/codecvt_unicode.cc: New test.
4477 * testsuite/22_locale/codecvt/codecvt_unicode.h: New header for
4478 tests.
4479 * testsuite/22_locale/codecvt/codecvt_unicode_wchar_t.cc: New
4480 test.
4481
4482 2023-01-13 Jonathan Wakely <jwakely@redhat.com>
4483
4484 PR libstdc++/108331
4485 * config/io/c_io_stdio.h (__c_lock): Define as a typedef for
4486 __GTHREAD_LEGACY_MUTEX_T if defined.
4487
4488 2023-01-13 Jonathan Wakely <jwakely@redhat.com>
4489
4490 PR libstdc++/108327
4491 * config/os/gnu-linux/ldbl-extra.ver (GLIBCXX_LDBL_3.4.31):
4492 Export __try_use_facet specializations for facets in namespace
4493 __gnu_cxx_ldbl128.
4494 * config/os/gnu-linux/ldbl-ieee128-extra.ver
4495 (GLIBCXX_IEEE128_3.4.31): Likewise for facets in namespace
4496 __gnu_cxx_ieee128.
4497 * testsuite/util/testsuite_abi.cc: Add to lists of known and
4498 latest versions.
4499
4500 2023-01-13 Jonathan Wakely <jwakely@redhat.com>
4501
4502 * include/bits/std_mutex.h: Remove <system_error> include.
4503 * include/std/condition_variable: Add <bits/error_constants.h>
4504 include.
4505 * include/std/mutex: Likewise.
4506 * include/std/shared_mutex: Likewise.
4507
4508 2023-01-12 Jonathan Wakely <jwakely@redhat.com>
4509
4510 PR libstdc++/77691
4511 * include/experimental/memory_resource
4512 (_GLIBCXX_MAX_ALIGN_MATCHES_MALLOC): Define.
4513 (do_allocate, do_deallocate): Check it.
4514 * testsuite/experimental/memory_resource/new_delete_resource.cc:
4515 Relax expected behaviour for 64-bit hppa-hp-hpux11.11.
4516
4517 2023-01-12 Jonathan Wakely <jwakely@redhat.com>
4518
4519 * doc/xml/manual/abi.xml: Add latest library versions.
4520 * doc/html/manual/abi.html: Regenerate.
4521
4522 2023-01-12 François Dumont <fdumont@gcc.gnu.org>
4523
4524 PR libstdc++/107189
4525 * include/bits/stl_tree.h (_Rb_tree<>::_M_insert_range_equal): Remove
4526 unused _Alloc_node instance.
4527
4528 2023-01-12 Jonathan Wakely <jwakely@redhat.com>
4529
4530 * include/bits/atomic_wait.h (__detail::__platform_wait_t):
4531 Define as unsigned long if always lock-free, and unsigned int
4532 otherwise.
4533
4534 2023-01-10 Jonathan Wakely <jwakely@redhat.com>
4535
4536 * src/c++20/tzdb.cc (tzdb_list::_S_init_tzdb): Use __try and
4537 __catch macros for exception handling.
4538
4539 2023-01-10 Jonathan Wakely <jwakely@redhat.com>
4540
4541 PR libstdc++/108221
4542 * include/bits/stl_algobase.h (__lg): Replace six overloads with
4543 a single function template for all integer types.
4544 * include/bits/stl_algo.h (__merge_adaptive_resize): Cast
4545 arithmetic results back to _Distance.
4546
4547 2023-01-10 Jonathan Wakely <jwakely@redhat.com>
4548
4549 PR libstdc++/108221
4550 * include/std/span (span::span()): Un-simplify constraint to
4551 work for size_t of lesser rank than int.
4552
4553 2023-01-07 LIU Hao <lh_mouse@126.com>
4554
4555 PR middle-end/108300
4556 * src/c++11/system_error.cc: Define `WIN32_LEAN_AND_MEAN` before
4557 <windows.h>.
4558 * src/c++11/thread.cc: Likewise.
4559 * src/c++17/fs_ops.cc: Likewise.
4560 * src/filesystem/ops.cc: Likewise.
4561
4562 2023-01-06 Jonathan Wakely <jwakely@redhat.com>
4563
4564 PR libstdc++/108228
4565 * src/c++20/tzdb.cc (zoneinfo_dir): Add diagnostic pragma.
4566
4567 2023-01-06 Jonathan Wakely <jwakely@redhat.com>
4568
4569 PR libstdc++/108235
4570 * src/c++20/tzdb.cc (time_zone::_Impl::RulesCounter): New class
4571 template and partial specialization for synchronizing access to
4572 time_zone::_Impl::infos.
4573 (time_zone::_M_get_sys_info, reload_tzdb): Adjust uses of
4574 rules_counter.
4575
4576 2023-01-06 Patrick Palka <ppalka@redhat.com>
4577
4578 PR libstdc++/108260
4579 * include/bits/utility.h (__cpp_lib_ranges_zip): Define for C++23.
4580 * include/std/ranges (__cpp_lib_ranges_zip): Likewise.
4581 (__cpp_lib_ranges_chunk): Likewise.
4582 (__cpp_lib_ranges_slide): Likewise.
4583 (__cpp_lib_ranges_chunk_by): Likewise.
4584 (__cpp_lib_ranges_join_with): Likewise.
4585 (__cpp_lib_ranges_repeat): Likewise.
4586 (__cpp_lib_ranges_stride): Likewise.
4587 (__cpp_lib_ranges_cartesian_product): Likewise.
4588 (__cpp_lib_ranges_as_rvalue): Likewise.
4589 * include/std/version: Ditto.
4590 * testsuite/20_util/tuple/p2321r2.cc: Verify value of
4591 feature-test macro.
4592 * testsuite/std/ranges/adaptors/as_rvalue/1.cc: Likewise.
4593 * testsuite/std/ranges/adaptors/chunk/1.cc: Likewise.
4594 * testsuite/std/ranges/adaptors/chunk_by/1.cc: Likewise.
4595 * testsuite/std/ranges/adaptors/join_with/1.cc: Likewise.
4596 * testsuite/std/ranges/adaptors/slide/1.cc: Likewise.
4597 * testsuite/std/ranges/adaptors/stride/1.cc: Likewise.
4598 * testsuite/std/ranges/cartesian_product/1.cc: Likewise.
4599 * testsuite/std/ranges/repeat/1.cc: Likewise.
4600 * testsuite/std/ranges/zip/1.cc: Likewise.
4601 * testsuite/std/ranges/version_c++23.cc: New test.
4602
4603 2023-01-06 Jonathan Wakely <jwakely@redhat.com>
4604
4605 PR libstdc++/108214
4606 * include/std/bitset (operator>>): Use alloca in the right
4607 scope, not in a constructor.
4608 * testsuite/20_util/bitset/io/input.cc: Check case from PR.
4609
4610 2023-01-06 Jonathan Wakely <jwakely@redhat.com>
4611
4612 PR libstdc++/108221
4613 * include/std/format (basic_format_arg) [!__cpp_lib_to_chars]:
4614 Disable visiting floating-point types.
4615
4616 2023-01-06 Jonathan Wakely <jwakely@redhat.com>
4617
4618 PR libstdc++/108288
4619 * include/debug/safe_iterator.h (_Safe_iterator::operator++(int))
4620 (_Safe_iterator::operator--(int)): Do not hold lock around
4621 construction of return value.
4622
4623 2023-01-05 John David Anglin <danglin@gcc.gnu.org>
4624
4625 * config/cpu/hppa/atomicity.h (_PA_LDCW_INSN): Define.
4626 (__exchange_and_add): Use _PA_LDCW_INSN. Use ordered store for
4627 lock release. Revise loop.
4628 (__atomic_add): Likewise.
4629
4630 2023-01-05 Jonathan Wakely <jwakely@redhat.com>
4631
4632 PR libstdc++/108212
4633 * python/libstdcxx/v6/printers.py (_utc_timezone): New global
4634 variable.
4635 (StdChronoTimePointPrinter::to_string): Use it.
4636
4637 2023-01-05 Jonathan Wakely <jwakely@redhat.com>
4638
4639 PR libstdc++/108290
4640 * include/std/functional (_Bind_front): Add no_unique_address
4641 attribute to data members.
4642 * testsuite/20_util/function_objects/bind_front/107784.cc: Check
4643 size of call wrappers with empty types for targets and bound
4644 arguments.
4645
4646 2023-01-05 Jonathan Wakely <jwakely@redhat.com>
4647
4648 PR libstdc++/108211
4649 * src/c++20/tzdb.cc (chrono::current_zone()): Check for zone
4650 using only last component of the name.
4651
4652 2023-01-05 Jonathan Wakely <jwakely@redhat.com>
4653
4654 PR libstdc++/108228
4655 PR libstdc++/108235
4656 * config/abi/pre/gnu.ver: Move zoneinfo_dir_override export to
4657 the latest symbol version.
4658 * src/c++20/tzdb.cc (USE_ATOMIC_SHARED_PTR): Define to 0 if
4659 atomic<_Node*> is not always lock free.
4660 (USE_ATOMIC_LIST_HEAD): New macro.
4661 [__hpux__] (__gnu_cxx::zoneinfo_dir_override()): Provide
4662 definition of weak symbol.
4663 (tzdb_list::_Node::_S_head): Rename to _S_head_cache.
4664 (tzdb_list::_Node::_S_list_head): New function for accessing
4665 list head efficiently.
4666 (tzdb_list::_Node::_S_cache_list_head): New function for
4667 updating _S_list_head.
4668
4669 2023-01-05 Jonathan Wakely <jwakely@redhat.com>
4670
4671 PR libstdc++/108265
4672 * include/std/chrono (hh_mm_ss): Do not use chrono::abs if
4673 duration rep is unsigned.
4674 * testsuite/std/time/hh_mm_ss/1.cc: Check unsigned rep.
4675
4676 2023-01-04 Iain Sandoe <iain@sandoe.co.uk>
4677
4678 PR libstdc++/108228
4679 * config/abi/pre/gnu.ver (GLIBCXX_3.4):
4680 Add __gnu_cxx::zoneinfo_dir_override().
4681
4682 2023-01-04 Jonathan Wakely <jwakely@redhat.com>
4683
4684 PR libstdc++/108258
4685 * include/std/array (__array_traits<T, 0>::operator T*()): Add
4686 constexpr.
4687 * testsuite/23_containers/array/element_access/constexpr_c++17.cc: Check
4688 std::array<T, 0>::data().
4689
4690 \f
4691 Copyright (C) 2023 Free Software Foundation, Inc.
4692
4693 Copying and distribution of this file, with or without modification,
4694 are permitted in any medium without royalty provided the copyright
4695 notice and this notice are preserved.