Daily bump.
[official-gcc.git] / libstdc++-v3 / ChangeLog
blob8f9e418008c2f6ea70c7d0f9e47e2681b0d08922
1 2024-01-19  Jonathan Wakely  <jwakely@redhat.com>
3         * include/std/format (_Spec::_M_parse_fill_and_align): Do not
4         use CTAD for _Utf32_view.
6 2024-01-19  Jonathan Wakely  <jwakely@redhat.com>
8         PR libstdc++/108822
9         * include/std/tuple (__glibcxx_no_dangling_refs) [C++17]: Fix
10         wrong fold-operator.
11         * testsuite/20_util/tuple/dangling_ref.cc: Check tuples with one
12         element and three elements. Check allocator-extended
13         constructors.
15 2024-01-19  Patrick Palka  <ppalka@redhat.com>
17         * include/precompiled/stdc++.h [_GLIBCXX_HOSTED]: Include
18         <print> and <text_encoding> for C++23 and C++26 respectively.
20 2024-01-18  Patrick Palka  <ppalka@redhat.com>
22         * include/bits/stl_pair.h [__cplusplus > 202002L]:
23         Guard P2321R2 changes with __glibcxx_ranges_zip instead.
25 2024-01-18  Patrick Palka  <ppalka@redhat.com>
27         * include/std/tuple [__cplusplus > 202002L]: Guard P2321R2
28         changes with __cpp_lib_ranges_zip instead.
30 2024-01-18  Patrick Palka  <ppalka@redhat.com>
32         PR libstdc++/109536
33         * include/debug/safe_base.h (_Safe_sequence_base::_M_swap):
34         Remove _GLIBCXX20_CONSTEXPR from non-inline member function.
35         * include/debug/safe_iterator.h
36         (_GLIBCXX20_CONSTEXPR_NON_LITERAL_SCOPE_BEGIN): Define.
37         (_GLIBCXX20_CONSTEXPR_NON_LITERAL_SCOPE_END): Define.
38         (_Safe_iterator::operator=): Use them around the code path that
39         defines a variable of type __gnu_cxx::__scoped_lock.
40         (_Safe_iterator::operator++): Likewise.
41         (_Safe_iterator::operator--): Likewise.
42         (_Safe_iterator::operator+=): Likewise.
43         (_Safe_iterator::operator-=): Likewise.
44         * testsuite/23_containers/vector/element_access/constexpr.cc
45         (test_iterators): Test more iterator operations.
46         * testsuite/23_containers/vector/bool/element_access/constexpr.cc
47         (test_iterators): Likewise.
48         * testsuite/std/ranges/adaptors/all.cc (test08) [_GLIBCXX_DEBUG]:
49         Remove.
51 2024-01-18  Jonathan Wakely  <jwakely@redhat.com>
53         * include/bits/unicode.h (__charset_alias_match): Initialize
54         __var_a and __var_b.
56 2024-01-18  Jonathan Wakely  <jwakely@redhat.com>
58         PR libstdc++/113450
59         * testsuite/std/format/functions/format.cc: Use signed char
60         instead of int8_t.
62 2024-01-17  Jonathan Wakely  <jwakely@redhat.com>
64         PR libstdc++/113318
65         * acinclude.m4 (GLIBCXX_CONFIGURE): Add c++26 directory.
66         (GLIBCXX_CHECK_TEXT_ENCODING): Define.
67         * config.h.in: Regenerate.
68         * configure: Regenerate.
69         * configure.ac: Use GLIBCXX_CHECK_TEXT_ENCODING.
70         * include/Makefile.am: Add new headers.
71         * include/Makefile.in: Regenerate.
72         * include/bits/locale_classes.h (locale::encoding): Declare new
73         member function.
74         * include/bits/unicode.h (__charset_alias_match): New function.
75         * include/bits/text_encoding-data.h: New file.
76         * include/bits/version.def (text_encoding): Define.
77         * include/bits/version.h: Regenerate.
78         * include/std/text_encoding: New file.
79         * src/Makefile.am: Add new subdirectory.
80         * src/Makefile.in: Regenerate.
81         * src/c++26/Makefile.am: New file.
82         * src/c++26/Makefile.in: New file.
83         * src/c++26/text_encoding.cc: New file.
84         * src/experimental/Makefile.am: Include c++26 convenience
85         library.
86         * src/experimental/Makefile.in: Regenerate.
87         * python/libstdcxx/v6/printers.py (StdTextEncodingPrinter): New
88         printer.
89         * scripts/gen_text_encoding_data.py: New file.
90         * testsuite/22_locale/locale/encoding.cc: New test.
91         * testsuite/ext/unicode/charset_alias_match.cc: New test.
92         * testsuite/std/text_encoding/cons.cc: New test.
93         * testsuite/std/text_encoding/members.cc: New test.
94         * testsuite/std/text_encoding/requirements.cc: New test.
96 2024-01-17  Jonathan Wakely  <jwakely@redhat.com>
98         * include/bits/unicode.h (_Grapheme_cluster_view): Require view.
99         Do not use CTAD for _Utf32_view.
100         (__format_width, __truncate): Do not use CTAD.
101         (enable_borrowed_range<_Utf_view<T, R>>): Define specialization.
102         (enable_borrowed_range<_Grapheme_cluster_view<R>>): Likewise.
104 2024-01-17  Patrick Palka  <ppalka@redhat.com>
106         * include/std/ranges (views::_CartesianProduct::operator()):
107         Adjust identity case as per P2540R1.
108         * testsuite/std/ranges/cartesian_product/1.cc (test01):
109         Adjust expected result of the identity case.
111 2024-01-15  Patrick Palka  <ppalka@redhat.com>
113         * include/std/variant (__detail::__variant::_Variadic_union):
114         Add bool __trivially_destructible template parameter.
115         (__detail::__variant::_Variadic_union::~_Variadic_union):
116         Use __trivially_destructible in constraints instead.
117         (__detail::__variant::_Variant_storage): Pass
118         __trivially_destructible value to _Variadic_union.
120 2024-01-15  Patrick Palka  <ppalka@redhat.com>
122         * include/bits/stl_iterator.h (const_iterator): Define conversion
123         operators as per P2836R1.
124         * include/bits/version.def (ranges_as_const): Update value.
125         * include/bits/version.h: Regenerate.
126         * testsuite/24_iterators/const_iterator/1.cc (test04): New test.
127         * testsuite/std/ranges/adaptors/as_const/1.cc: Adjust expected
128         value of __cpp_lib_ranges_as_const.
129         * testsuite/std/ranges/version_c++23.cc: Likewise.
131 2024-01-15  Jonathan Wakely  <jwakely@redhat.com>
133         PR libstdc++/108822
134         * include/std/tuple (__assignable, __is_nothrow_assignable):
135         Move pre-C++20 definitions adjacent to their use.
137 2024-01-15  Jonathan Wakely  <jwakely@redhat.com>
139         PR testsuite/113366
140         * include/std/format (basic_format_arg): Use __formattable
141         variable template instead of __format::__formattable_with
142         concept.
144 2024-01-15  Jonathan Wakely  <jwakely@redhat.com>
146         * src/c++20/tzdata.zi: Import new file from 2023d release.
147         * src/c++20/tzdb.cc (tzdb_list::_Node::_S_read_leap_seconds)
148         Update expiry date for leap seconds list.
150 2024-01-13  Jonathan Wakely  <jwakely@redhat.com>
152         PR libstdc++/108822
153         * include/std/tuple (tuple): Add checks for dangling references.
154         Reimplement constraints and constant expressions using C++20
155         features.
156         * include/std/type_traits [C++20]
157         (__is_implicitly_default_constructible_v): Define.
158         (__is_implicitly_default_constructible): Use variable template.
159         * testsuite/20_util/tuple/dangling_ref.cc: New test.
161 2024-01-13  Patrick Palka  <ppalka@redhat.com>
163         PR libstdc++/108827
164         PR libstdc++/111327
165         * include/bits/version.def (bind_back): Define.
166         * include/bits/version.h: Regenerate.
167         * include/std/functional (_Bind_back): Define for C++23.
168         (bind_back): Likewise.
169         * testsuite/20_util/function_objects/bind_back/1.cc: New test
170         (adapted from corresponding bind_front test).
171         * testsuite/20_util/function_objects/bind_back/111327.cc: Likewise.
173 2024-01-13  Patrick Palka  <ppalka@redhat.com>
175         * include/std/functional (_Bind_front): Remove =default special
176         member function declarations.
177         (_Bind_front::operator()): Implement using C++23 deducing this
178         when available.
179         * testsuite/20_util/function_objects/bind_front/111327.cc:
180         Adjust testcase to expect better errors in C++23 mode.
182 2024-01-13  Patrick Palka  <ppalka@redhat.com>
184         * include/std/ranges (views::__adaptor::operator|): Perform
185         perfect forwarding of arguments.
186         (views::__adaptor::_RangeAdaptor::operator()): Pass dummy
187         first argument to _Partial.
188         (views::__adaptor::_Partial::_Partial): Likewise.  Add dummy
189         first parameter.
190         (views::__adaptor::_Pipe::_Pipe): Perform perfect forwarding
191         of arguments.
192         (to): Pass dummy first argument to _Partial.
194 2024-01-13  Jonathan Wakely  <jwakely@redhat.com>
196         PR libstdc++/107466
197         * include/bits/random.tcc (subtract_with_carry_engine::seed):
198         Implement proposed resolution of LWG 4014.
199         * testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error
200         line number.
201         * testsuite/26_numerics/random/subtract_with_carry_engine/cons/lwg3809.cc:
202         Check for expected result of 64-bit engine with seed that
203         doesn't fit in 32-bits.
205 2024-01-12  Jonathan Wakely  <jwakely@redhat.com>
207         PR libstdc++/113320
208         * include/std/format (__format::_Runtime_format_string): Add
209         constructor and disable copy operations.
210         (basic_format_string(_Runtime_format_string)): Add noexcept and
211         take parameter by value not rvalue reference.
212         (runtime_format): Add noexcept.
213         * testsuite/std/format/runtime_format.cc: Check noexcept. Check
214         that construction is only possible from prvalues, not xvalues.
216 2024-01-12  Jonathan Wakely  <jwakely@redhat.com>
218         PR libstdc++/105505
219         * include/bits/stl_pair.h (pair::pair(U1&&, U2&&)) [C++23]: Add
220         default template arguments, as per P1951R1.
221         * testsuite/20_util/pair/cons/default_tmpl_args.cc: New test.
223 2024-01-12  Jonathan Wakely  <jwakely@redhat.com>
225         * include/std/format (__format::_Arg_store): Fix PR number in
226         comment. Simplify preprocessor code.
228 2024-01-11  Jonathan Wakely  <jwakely@redhat.com>
230         * doc/xml/manual/evolution.xml: Fix spelling.
231         * doc/html/manual/api.html: Regenerate.
233 2024-01-11  Jonathan Wakely  <jwakely@redhat.com>
235         * doc/xml/manual/evolution.xml: Document addition of
236         libstdc++exp.a.
237         * doc/html/*: Regenerate.
239 2024-01-11  Marcus Haehnel  <marcus.haehnel@kernkonzept.com>
241         * libsupc++/eh_unex_handler.cc: Adjust definition type to
242         declaration.
244 2024-01-11  Michael Levine  <mlevine55@bloomberg.net>
246         * include/std/ranges (__glibcxx_want_ranges_iota): Remove
247         duplicate definition.
249 2024-01-11  François Dumont  <fdumont@gcc.gnu.org>
251         PR libstdc++/112477
252         * src/c++11/debug.cc
253         (_Safe_iterator_base::_M_attach): Reset _M_version to 0 if attaching to null
254         sequence.
255         (_Safe_iterator_base::_M_attach_single): Likewise.
256         (_Safe_local_iterator_base::_M_attach): Likewise.
257         (_Safe_local_iterator_base::_M_attach_single): Likewise.
258         * testsuite/23_containers/map/debug/112477.cc: New test case.
260 2024-01-11  Patrick Palka  <ppalka@redhat.com>
262         * include/bits/move.h (__like_t): Define in C++23 mode.
263         * include/std/ranges (views::__adaptor::Partial::operator()):
264         Implement using C++23 deducing this when available.
265         (views::__adaptor::_Pipe::operator()): Likewise.
266         * testsuite/std/ranges/adaptors/100577.cc: Adjust testcase to
267         accept new "no match for call" errors issued in C++23 mode.
268         * testsuite/std/ranges/adaptors/lazy_split_neg.cc: Likewise.
270 2024-01-11  Jonathan Wakely  <jwakely@redhat.com>
272         * python/libstdcxx/v6/printers.py (StdIntegralConstantPrinter):
273         Add printer for std::integral_constant.
274         * testsuite/libstdc++-prettyprinters/cxx11.cc: Test it.
276 2024-01-11  Jonathan Wakely  <jwakely@redhat.com>
278         PR libstdc++/113258
279         * libsupc++/new_opa.cc: Prefer to use posix_memalign if
280         available.
282 2024-01-11  Ken Matsui  <kmatsui@gcc.gnu.org>
284         * src/filesystem/ops-common.h (stat_type): Use using.
286 2024-01-11  Ken Matsui  <kmatsui@gcc.gnu.org>
288         PR libstdc++/113250
289         * src/c++17/fs_ops.cc (fs::equivalent): Use || instead of &&.
290         * src/filesystem/ops.cc (fs::equivalent): Likewise.
291         * testsuite/27_io/filesystem/operations/equivalent.cc: Handle
292         error codes.
293         * testsuite/experimental/filesystem/operations/equivalent.cc:
294         Likewise.
296 2024-01-11  Ken Matsui  <kmatsui@gcc.gnu.org>
298         * include/std/type_traits (is_compound): Do not use __not_.
299         (is_compound_v): Use is_fundamental_v instead.
301 2024-01-11  Patrick Palka  <ppalka@redhat.com>
303         * include/bits/utility.h (_Nth_type): Use
304         _GLIBCXX_USE_BUILTIN_TRAIT instead of __has_builtin.
306 2024-01-09  Jonathan Wakely  <jwakely@redhat.com>
308         * include/bits/unicode-data.h: Regenerate.
309         * include/bits/unicode.h (_Utf_iterator::operator++()): Fix off
310         by one error.
311         (__incb_property): Add missing check for values before the
312         first edge.
313         (__is_extended_pictographic): Invert return values to fix
314         copy&pasted logic.
315         (_Grapheme_cluster_view::_Iterator): Remove second iterator
316         member and find end of cluster lazily.
317         * testsuite/ext/unicode/grapheme_view.cc: New test.
318         * testsuite/ext/unicode/properties.cc: New test.
319         * testsuite/ext/unicode/view.cc: New test.
321 2024-01-09  Andreas Schwab  <schwab@linux-m68k.org>
323         * scripts/extract_symvers.in: Require final colon to only match
324         .dsynsym in the header of the dynamic symtab.
326 2024-01-09  Jonathan Wakely  <jwakely@redhat.com>
328         * include/bits/chrono_io.h (__formatter_chrono::_M_F): Simplify
329         handling of string returned from std::format.
330         (__formatter_chrono::_M_R_T): Likewise.
332 2024-01-08  Jonathan Wakely  <jwakely@redhat.com>
334         * include/bits/unicode.h (__null_sentinel): Remove.
335         * testsuite/17_intro/names.cc: Add __null_sentinel.
337 2024-01-08  Jonathan Wakely  <jwakely@redhat.com>
339         * include/std/format (__format::_Runtime_format_string): Define
340         new class template.
341         (basic_format_string): Add non-consteval constructor for runtime
342         format strings.
343         (runtime_format): Define new function for C++26.
344         * testsuite/std/format/runtime_format.cc: New test.
346 2024-01-08  Jonathan Wakely  <jwakely@redhat.com>
348         * include/bits/chrono_io.h (__formatter_chrono): Always use
349         lvalue arguments to make_format_args.
350         * include/std/format (make_format_args): Change parameter pack
351         from forwarding references to lvalue references. Remove use of
352         remove_reference_t which is now unnecessary.
353         (format_to, formatted_size): Remove incorrect forwarding of
354         arguments.
355         * include/std/ostream (print): Remove forwarding of arguments.
356         * include/std/print (print): Likewise.
357         * testsuite/20_util/duration/io.cc: Use lvalues as arguments to
358         make_format_args.
359         * testsuite/std/format/arguments/args.cc: Likewise.
360         * testsuite/std/format/arguments/lwg3810.cc: Likewise.
361         * testsuite/std/format/functions/format.cc: Likewise.
362         * testsuite/std/format/functions/vformat_to.cc: Likewise.
363         * testsuite/std/format/string.cc: Likewise.
364         * testsuite/std/time/day/io.cc: Likewise.
365         * testsuite/std/time/month/io.cc: Likewise.
366         * testsuite/std/time/weekday/io.cc: Likewise.
367         * testsuite/std/time/year/io.cc: Likewise.
368         * testsuite/std/time/year_month_day/io.cc: Likewise.
369         * testsuite/std/format/arguments/args_neg.cc: New test.
371 2024-01-08  Jonathan Wakely  <jwakely@redhat.com>
373         * include/Makefile.am: Add new headers.
374         * include/Makefile.in: Regenerate.
375         * include/bits/unicode.h: New file.
376         * include/bits/unicode-data.h: New file.
377         * include/std/format: Include <bits/unicode.h>.
378         (__literal_encoding_is_utf8): Move to <bits/unicode.h>.
379         (_Spec::_M_fill): Change type to char32_t.
380         (_Spec::_M_parse_fill_and_align): Read a Unicode scalar value
381         instead of a single character.
382         (__write_padded): Change __fill_char parameter to char32_t and
383         encode it into the output.
384         (__formatter_str::format): Use new __unicode::__field_width and
385         __unicode::__truncate functions.
386         * include/std/ostream: Adjust namespace qualification for
387         __literal_encoding_is_utf8.
388         * include/std/print: Likewise.
389         * src/c++23/print.cc: Add [[unlikely]] attribute to error path.
390         * testsuite/ext/unicode/view.cc: New test.
391         * testsuite/std/format/functions/format.cc: Add missing examples
392         from the standard demonstrating alignment with non-ASCII
393         characters. Add examples checking correct handling of extended
394         grapheme clusters.
396 2024-01-08  Jonathan Wakely  <jwakely@redhat.com>
398         * include/bits/version.def (format_uchar): Define.
399         * include/bits/version.h: Regenerate.
400         * include/std/format (formatter<C, C>::format): Check for
401         _Pres_c and call _M_format_character directly. Cast C to its
402         unsigned equivalent for formatting as an integer.
403         (formatter<char, wchar_t>::format): Likewise.
404         (basic_format_arg(T&)): Store char arguments as unsigned char
405         for formatting to a wide string.
406         * testsuite/std/format/functions/format.cc: Adjust test. Check
407         formatting of
409 2024-01-07  Jonathan Wakely  <jwakely@redhat.com>
411         PR libstdc++/112997
412         * libsupc++/unwind-cxx.h (__cxa_call_terminate): Change first
413         parameter to void*.
415 2024-01-07  Jonathan Wakely  <jwakely@redhat.com>
417         * testsuite/20_util/variant/87619.cc: Remove dg-timeout-factor.
419 2024-01-07  Jonathan Wakely  <jwakely@redhat.com>
421         * include/std/type_traits (is_trivially_destructible_v): Use
422         built-in directly when concepts are supported.
423         * testsuite/20_util/is_trivially_destructible/value_v.cc: New
424         test.
426 2024-01-06  Gwenole Beauchesne  <gb.devel@gmail.com>
428         * testsuite/tr1/8_c_compatibility/cinttypes/functions.cc: Use
429         nonnull arguments to strtoimax() and wcstoimax() functions.
431 2024-01-05  Jonathan Wakely  <jwakely@redhat.com>
433         * src/c++17/fs_path.cc (path::_List::reserve): Limit maximum
434         size and check for overflows in arithmetic.
435         (path::operator/=(const path&)): Remove redundant exponential
436         growth calculation.
438 2024-01-05  Martin Küttler  <martin.kuettler@kernkonzept.com>
440         * src/c++17/fs_path.cc (path::_List::reserve): Avoid
441         floating-point arithmetic.
443 2024-01-05  Jonathan Wakely  <jwakely@redhat.com>
445         PR libstdc++/113241
446         * include/std/type_traits (is_convertible_v): Guard use of
447         built-in with preprocessor check.
449 2024-01-05  Jonathan Wakely  <jwakely@redhat.com>
451         PR libstdc++/113200
452         * include/bits/char_traits.h (__gnu_cxx::char_traits::move): Use
453         __builtin_constant_p to check for unrelated pointers that cannot
454         be compared during constant evaluation.
455         * testsuite/21_strings/char_traits/requirements/113200.cc: New
456         test.
458 2024-01-05  Cassio Neri  <cassio.neri@gmail.com>
460         * include/std/chrono: Fix + and - for months and weekdays.
461         * testsuite/std/time/month/1.cc: Add constexpr tests against overflow.
462         * testsuite/std/time/month/2.cc: New test for extreme values.
463         * testsuite/std/time/weekday/1.cc: Add constexpr tests against overflow.
464         * testsuite/std/time/weekday/2.cc: New test for extreme values.
466 2024-01-05  Jonathan Wakely  <jwakely@redhat.com>
468         PR libstdc++/113099
469         * include/bits/locale_classes.tcc (__try_use_facet): Use
470         if-constexpr for C++11 and up.
472 2024-01-05  Ken Matsui  <kmatsui@gcc.gnu.org>
474         * include/std/type_traits: Use _GLIBCXX_USE_BUILTIN_TRAIT.
476 2024-01-04  Arsen Arsenović  <arsen@aarsen.me>
478         * include/std/generator (_Subyield_state::_M_jump_in): Fix typo
479         reported by Will Hawkins <hawkinsw@obs.cr>.
481 2024-01-04  Arsen Arsenović  <arsen@aarsen.me>
483         * include/std/generator (_Stateless_alloc): Rename typename _A
484         to _All.
486 2024-01-03  Patrick Palka  <ppalka@redhat.com>
488         PR testsuite/113175
489         * testsuite/std/ranges/iota/max_size_type.cc (test02): Reduce
490         'limit' to 100 from 1000 and adjust 'log2_limit' accordingly.
491         (test03): Likewise.
494 Copyright (C) 2024 Free Software Foundation, Inc.
496 Copying and distribution of this file, with or without modification,
497 are permitted in any medium without royalty provided the copyright
498 notice and this notice are preserved.