1 2024-01-31 Jonathan Wakely <jwakely@redhat.com>
3 * acinclude.m4 (GLIBCXX_CHECK_TEXT_ENCODING): Use <xlocale.h> if
5 * configure: Regenerate.
6 * src/c++26/text_encoding.cc: Use <xlocale.h>.
8 2024-01-31 Jonathan Wakely <jwakely@redhat.com>
9 Ewan Higgs <ewan.higgs@gmail.com>
11 * include/bits/text_encoding-data.h: Regenerate.
12 * scripts/gen_text_encoding_data.py: Add extra_aliases dict
14 * testsuite/std/text_encoding/cons.cc: Check "ascii" is known.
16 2024-01-31 Jonathan Wakely <jwakely@redhat.com>
18 * doc/xml/manual/using.xml: Update tables of supported headers.
19 * doc/html/*: Regenerate.
21 2024-01-31 Jonathan Wakely <jwakely@redhat.com>
23 * include/std/bitset (_Base_bitset::_M_do_to_ullong): Avoid
24 -Wshift-count-overflow warning.
26 2024-01-30 Jonathan Wakely <jwakely@redhat.com>
28 * testsuite/std/time/clock/gps/io.cc: Fix expected result in
29 assertion and call test_format() from main.
31 2024-01-29 François Dumont <fdumont@gcc.gnu.org>
33 * doc/xml/manual/debug_mode.xml: Link against libstdc++exp.a to use
34 _GLIBCXX_DEBUG_BACKTRACE macro.
36 2024-01-24 Huanghui Nie <nnnjkk@gmail.com>
37 Théo Papadopoulo <papadopoulo@gmail.com>
39 * include/bits/hashtable.h (_Hahstable<>::_M_remove_bucket_begin): Remove
40 _M_before_begin check and cleanup implementation.
42 2024-01-22 Jonathan Wakely <jwakely@redhat.com>
44 * testsuite/std/time/clock/file/io.cc: Fix expected result in
45 assertion and call test_format() from main.
47 2024-01-21 Jonathan Wakely <jwakely@redhat.com>
50 * include/bits/chrono_io.h (__formatter_chrono::_M_S): Fix
51 printing of subseconds with floating-point rep.
52 (__formatter_chrono::_M_format_to_ostream): Do not write
53 time_point specializations directly to the ostream.
54 (formatter<chrono::sys_time<D>, C>::parse): Do not allow an
55 empty chrono-spec if the type fails to meet the constraints for
56 writing to an ostream with operator<<.
57 * testsuite/std/time/clock/file/io.cc: Check formatting
58 non-integral times with empty chrono-specs.
59 * testsuite/std/time/clock/gps/io.cc: Likewise.
60 * testsuite/std/time/clock/utc/io.cc: Likewise.
61 * testsuite/std/time/hh_mm_ss/io.cc: Likewise.
63 2024-01-21 Jonathan Wakely <jwakely@redhat.com>
65 * include/bits/chrono.h (__file_clock::from_sys)
66 (__file_clock::to_sys, __file_clock::_S_from_sys)
67 (__file_clock::_S_to_sys): Use common_type for return type.
68 * testsuite/std/time/clock/file/members.cc: Check round trip
69 conversion for time with lower precision that seconds.
71 2024-01-21 Jonathan Wakely <jwakely@redhat.com>
74 * include/std/format (__formatter_fp::format): Fix logic for
76 * testsuite/std/format/functions/format.cc: Check buggy cases of
77 alternate forms with g presentation type.
79 2024-01-20 Marek Polacek <polacek@redhat.com>
82 * include/std/ranges: Add #pragma to disable -Wdangling-reference with
83 std::ranges::views::__adaptor::operator|.
85 2024-01-19 Jonathan Wakely <jwakely@redhat.com>
87 * include/std/format (_Spec::_M_parse_fill_and_align): Do not
88 use CTAD for _Utf32_view.
90 2024-01-19 Jonathan Wakely <jwakely@redhat.com>
93 * include/std/tuple (__glibcxx_no_dangling_refs) [C++17]: Fix
95 * testsuite/20_util/tuple/dangling_ref.cc: Check tuples with one
96 element and three elements. Check allocator-extended
99 2024-01-19 Patrick Palka <ppalka@redhat.com>
101 * include/precompiled/stdc++.h [_GLIBCXX_HOSTED]: Include
102 <print> and <text_encoding> for C++23 and C++26 respectively.
104 2024-01-18 Patrick Palka <ppalka@redhat.com>
106 * include/bits/stl_pair.h [__cplusplus > 202002L]:
107 Guard P2321R2 changes with __glibcxx_ranges_zip instead.
109 2024-01-18 Patrick Palka <ppalka@redhat.com>
111 * include/std/tuple [__cplusplus > 202002L]: Guard P2321R2
112 changes with __cpp_lib_ranges_zip instead.
114 2024-01-18 Patrick Palka <ppalka@redhat.com>
117 * include/debug/safe_base.h (_Safe_sequence_base::_M_swap):
118 Remove _GLIBCXX20_CONSTEXPR from non-inline member function.
119 * include/debug/safe_iterator.h
120 (_GLIBCXX20_CONSTEXPR_NON_LITERAL_SCOPE_BEGIN): Define.
121 (_GLIBCXX20_CONSTEXPR_NON_LITERAL_SCOPE_END): Define.
122 (_Safe_iterator::operator=): Use them around the code path that
123 defines a variable of type __gnu_cxx::__scoped_lock.
124 (_Safe_iterator::operator++): Likewise.
125 (_Safe_iterator::operator--): Likewise.
126 (_Safe_iterator::operator+=): Likewise.
127 (_Safe_iterator::operator-=): Likewise.
128 * testsuite/23_containers/vector/element_access/constexpr.cc
129 (test_iterators): Test more iterator operations.
130 * testsuite/23_containers/vector/bool/element_access/constexpr.cc
131 (test_iterators): Likewise.
132 * testsuite/std/ranges/adaptors/all.cc (test08) [_GLIBCXX_DEBUG]:
135 2024-01-18 Jonathan Wakely <jwakely@redhat.com>
137 * include/bits/unicode.h (__charset_alias_match): Initialize
140 2024-01-18 Jonathan Wakely <jwakely@redhat.com>
143 * testsuite/std/format/functions/format.cc: Use signed char
146 2024-01-17 Jonathan Wakely <jwakely@redhat.com>
149 * acinclude.m4 (GLIBCXX_CONFIGURE): Add c++26 directory.
150 (GLIBCXX_CHECK_TEXT_ENCODING): Define.
151 * config.h.in: Regenerate.
152 * configure: Regenerate.
153 * configure.ac: Use GLIBCXX_CHECK_TEXT_ENCODING.
154 * include/Makefile.am: Add new headers.
155 * include/Makefile.in: Regenerate.
156 * include/bits/locale_classes.h (locale::encoding): Declare new
158 * include/bits/unicode.h (__charset_alias_match): New function.
159 * include/bits/text_encoding-data.h: New file.
160 * include/bits/version.def (text_encoding): Define.
161 * include/bits/version.h: Regenerate.
162 * include/std/text_encoding: New file.
163 * src/Makefile.am: Add new subdirectory.
164 * src/Makefile.in: Regenerate.
165 * src/c++26/Makefile.am: New file.
166 * src/c++26/Makefile.in: New file.
167 * src/c++26/text_encoding.cc: New file.
168 * src/experimental/Makefile.am: Include c++26 convenience
170 * src/experimental/Makefile.in: Regenerate.
171 * python/libstdcxx/v6/printers.py (StdTextEncodingPrinter): New
173 * scripts/gen_text_encoding_data.py: New file.
174 * testsuite/22_locale/locale/encoding.cc: New test.
175 * testsuite/ext/unicode/charset_alias_match.cc: New test.
176 * testsuite/std/text_encoding/cons.cc: New test.
177 * testsuite/std/text_encoding/members.cc: New test.
178 * testsuite/std/text_encoding/requirements.cc: New test.
180 2024-01-17 Jonathan Wakely <jwakely@redhat.com>
182 * include/bits/unicode.h (_Grapheme_cluster_view): Require view.
183 Do not use CTAD for _Utf32_view.
184 (__format_width, __truncate): Do not use CTAD.
185 (enable_borrowed_range<_Utf_view<T, R>>): Define specialization.
186 (enable_borrowed_range<_Grapheme_cluster_view<R>>): Likewise.
188 2024-01-17 Patrick Palka <ppalka@redhat.com>
190 * include/std/ranges (views::_CartesianProduct::operator()):
191 Adjust identity case as per P2540R1.
192 * testsuite/std/ranges/cartesian_product/1.cc (test01):
193 Adjust expected result of the identity case.
195 2024-01-15 Patrick Palka <ppalka@redhat.com>
197 * include/std/variant (__detail::__variant::_Variadic_union):
198 Add bool __trivially_destructible template parameter.
199 (__detail::__variant::_Variadic_union::~_Variadic_union):
200 Use __trivially_destructible in constraints instead.
201 (__detail::__variant::_Variant_storage): Pass
202 __trivially_destructible value to _Variadic_union.
204 2024-01-15 Patrick Palka <ppalka@redhat.com>
206 * include/bits/stl_iterator.h (const_iterator): Define conversion
207 operators as per P2836R1.
208 * include/bits/version.def (ranges_as_const): Update value.
209 * include/bits/version.h: Regenerate.
210 * testsuite/24_iterators/const_iterator/1.cc (test04): New test.
211 * testsuite/std/ranges/adaptors/as_const/1.cc: Adjust expected
212 value of __cpp_lib_ranges_as_const.
213 * testsuite/std/ranges/version_c++23.cc: Likewise.
215 2024-01-15 Jonathan Wakely <jwakely@redhat.com>
218 * include/std/tuple (__assignable, __is_nothrow_assignable):
219 Move pre-C++20 definitions adjacent to their use.
221 2024-01-15 Jonathan Wakely <jwakely@redhat.com>
224 * include/std/format (basic_format_arg): Use __formattable
225 variable template instead of __format::__formattable_with
228 2024-01-15 Jonathan Wakely <jwakely@redhat.com>
230 * src/c++20/tzdata.zi: Import new file from 2023d release.
231 * src/c++20/tzdb.cc (tzdb_list::_Node::_S_read_leap_seconds)
232 Update expiry date for leap seconds list.
234 2024-01-13 Jonathan Wakely <jwakely@redhat.com>
237 * include/std/tuple (tuple): Add checks for dangling references.
238 Reimplement constraints and constant expressions using C++20
240 * include/std/type_traits [C++20]
241 (__is_implicitly_default_constructible_v): Define.
242 (__is_implicitly_default_constructible): Use variable template.
243 * testsuite/20_util/tuple/dangling_ref.cc: New test.
245 2024-01-13 Patrick Palka <ppalka@redhat.com>
249 * include/bits/version.def (bind_back): Define.
250 * include/bits/version.h: Regenerate.
251 * include/std/functional (_Bind_back): Define for C++23.
252 (bind_back): Likewise.
253 * testsuite/20_util/function_objects/bind_back/1.cc: New test
254 (adapted from corresponding bind_front test).
255 * testsuite/20_util/function_objects/bind_back/111327.cc: Likewise.
257 2024-01-13 Patrick Palka <ppalka@redhat.com>
259 * include/std/functional (_Bind_front): Remove =default special
260 member function declarations.
261 (_Bind_front::operator()): Implement using C++23 deducing this
263 * testsuite/20_util/function_objects/bind_front/111327.cc:
264 Adjust testcase to expect better errors in C++23 mode.
266 2024-01-13 Patrick Palka <ppalka@redhat.com>
268 * include/std/ranges (views::__adaptor::operator|): Perform
269 perfect forwarding of arguments.
270 (views::__adaptor::_RangeAdaptor::operator()): Pass dummy
271 first argument to _Partial.
272 (views::__adaptor::_Partial::_Partial): Likewise. Add dummy
274 (views::__adaptor::_Pipe::_Pipe): Perform perfect forwarding
276 (to): Pass dummy first argument to _Partial.
278 2024-01-13 Jonathan Wakely <jwakely@redhat.com>
281 * include/bits/random.tcc (subtract_with_carry_engine::seed):
282 Implement proposed resolution of LWG 4014.
283 * testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error
285 * testsuite/26_numerics/random/subtract_with_carry_engine/cons/lwg3809.cc:
286 Check for expected result of 64-bit engine with seed that
287 doesn't fit in 32-bits.
289 2024-01-12 Jonathan Wakely <jwakely@redhat.com>
292 * include/std/format (__format::_Runtime_format_string): Add
293 constructor and disable copy operations.
294 (basic_format_string(_Runtime_format_string)): Add noexcept and
295 take parameter by value not rvalue reference.
296 (runtime_format): Add noexcept.
297 * testsuite/std/format/runtime_format.cc: Check noexcept. Check
298 that construction is only possible from prvalues, not xvalues.
300 2024-01-12 Jonathan Wakely <jwakely@redhat.com>
303 * include/bits/stl_pair.h (pair::pair(U1&&, U2&&)) [C++23]: Add
304 default template arguments, as per P1951R1.
305 * testsuite/20_util/pair/cons/default_tmpl_args.cc: New test.
307 2024-01-12 Jonathan Wakely <jwakely@redhat.com>
309 * include/std/format (__format::_Arg_store): Fix PR number in
310 comment. Simplify preprocessor code.
312 2024-01-11 Jonathan Wakely <jwakely@redhat.com>
314 * doc/xml/manual/evolution.xml: Fix spelling.
315 * doc/html/manual/api.html: Regenerate.
317 2024-01-11 Jonathan Wakely <jwakely@redhat.com>
319 * doc/xml/manual/evolution.xml: Document addition of
321 * doc/html/*: Regenerate.
323 2024-01-11 Marcus Haehnel <marcus.haehnel@kernkonzept.com>
325 * libsupc++/eh_unex_handler.cc: Adjust definition type to
328 2024-01-11 Michael Levine <mlevine55@bloomberg.net>
330 * include/std/ranges (__glibcxx_want_ranges_iota): Remove
331 duplicate definition.
333 2024-01-11 François Dumont <fdumont@gcc.gnu.org>
337 (_Safe_iterator_base::_M_attach): Reset _M_version to 0 if attaching to null
339 (_Safe_iterator_base::_M_attach_single): Likewise.
340 (_Safe_local_iterator_base::_M_attach): Likewise.
341 (_Safe_local_iterator_base::_M_attach_single): Likewise.
342 * testsuite/23_containers/map/debug/112477.cc: New test case.
344 2024-01-11 Patrick Palka <ppalka@redhat.com>
346 * include/bits/move.h (__like_t): Define in C++23 mode.
347 * include/std/ranges (views::__adaptor::Partial::operator()):
348 Implement using C++23 deducing this when available.
349 (views::__adaptor::_Pipe::operator()): Likewise.
350 * testsuite/std/ranges/adaptors/100577.cc: Adjust testcase to
351 accept new "no match for call" errors issued in C++23 mode.
352 * testsuite/std/ranges/adaptors/lazy_split_neg.cc: Likewise.
354 2024-01-11 Jonathan Wakely <jwakely@redhat.com>
356 * python/libstdcxx/v6/printers.py (StdIntegralConstantPrinter):
357 Add printer for std::integral_constant.
358 * testsuite/libstdc++-prettyprinters/cxx11.cc: Test it.
360 2024-01-11 Jonathan Wakely <jwakely@redhat.com>
363 * libsupc++/new_opa.cc: Prefer to use posix_memalign if
366 2024-01-11 Ken Matsui <kmatsui@gcc.gnu.org>
368 * src/filesystem/ops-common.h (stat_type): Use using.
370 2024-01-11 Ken Matsui <kmatsui@gcc.gnu.org>
373 * src/c++17/fs_ops.cc (fs::equivalent): Use || instead of &&.
374 * src/filesystem/ops.cc (fs::equivalent): Likewise.
375 * testsuite/27_io/filesystem/operations/equivalent.cc: Handle
377 * testsuite/experimental/filesystem/operations/equivalent.cc:
380 2024-01-11 Ken Matsui <kmatsui@gcc.gnu.org>
382 * include/std/type_traits (is_compound): Do not use __not_.
383 (is_compound_v): Use is_fundamental_v instead.
385 2024-01-11 Patrick Palka <ppalka@redhat.com>
387 * include/bits/utility.h (_Nth_type): Use
388 _GLIBCXX_USE_BUILTIN_TRAIT instead of __has_builtin.
390 2024-01-09 Jonathan Wakely <jwakely@redhat.com>
392 * include/bits/unicode-data.h: Regenerate.
393 * include/bits/unicode.h (_Utf_iterator::operator++()): Fix off
395 (__incb_property): Add missing check for values before the
397 (__is_extended_pictographic): Invert return values to fix
399 (_Grapheme_cluster_view::_Iterator): Remove second iterator
400 member and find end of cluster lazily.
401 * testsuite/ext/unicode/grapheme_view.cc: New test.
402 * testsuite/ext/unicode/properties.cc: New test.
403 * testsuite/ext/unicode/view.cc: New test.
405 2024-01-09 Andreas Schwab <schwab@linux-m68k.org>
407 * scripts/extract_symvers.in: Require final colon to only match
408 .dsynsym in the header of the dynamic symtab.
410 2024-01-09 Jonathan Wakely <jwakely@redhat.com>
412 * include/bits/chrono_io.h (__formatter_chrono::_M_F): Simplify
413 handling of string returned from std::format.
414 (__formatter_chrono::_M_R_T): Likewise.
416 2024-01-08 Jonathan Wakely <jwakely@redhat.com>
418 * include/bits/unicode.h (__null_sentinel): Remove.
419 * testsuite/17_intro/names.cc: Add __null_sentinel.
421 2024-01-08 Jonathan Wakely <jwakely@redhat.com>
423 * include/std/format (__format::_Runtime_format_string): Define
425 (basic_format_string): Add non-consteval constructor for runtime
427 (runtime_format): Define new function for C++26.
428 * testsuite/std/format/runtime_format.cc: New test.
430 2024-01-08 Jonathan Wakely <jwakely@redhat.com>
432 * include/bits/chrono_io.h (__formatter_chrono): Always use
433 lvalue arguments to make_format_args.
434 * include/std/format (make_format_args): Change parameter pack
435 from forwarding references to lvalue references. Remove use of
436 remove_reference_t which is now unnecessary.
437 (format_to, formatted_size): Remove incorrect forwarding of
439 * include/std/ostream (print): Remove forwarding of arguments.
440 * include/std/print (print): Likewise.
441 * testsuite/20_util/duration/io.cc: Use lvalues as arguments to
443 * testsuite/std/format/arguments/args.cc: Likewise.
444 * testsuite/std/format/arguments/lwg3810.cc: Likewise.
445 * testsuite/std/format/functions/format.cc: Likewise.
446 * testsuite/std/format/functions/vformat_to.cc: Likewise.
447 * testsuite/std/format/string.cc: Likewise.
448 * testsuite/std/time/day/io.cc: Likewise.
449 * testsuite/std/time/month/io.cc: Likewise.
450 * testsuite/std/time/weekday/io.cc: Likewise.
451 * testsuite/std/time/year/io.cc: Likewise.
452 * testsuite/std/time/year_month_day/io.cc: Likewise.
453 * testsuite/std/format/arguments/args_neg.cc: New test.
455 2024-01-08 Jonathan Wakely <jwakely@redhat.com>
457 * include/Makefile.am: Add new headers.
458 * include/Makefile.in: Regenerate.
459 * include/bits/unicode.h: New file.
460 * include/bits/unicode-data.h: New file.
461 * include/std/format: Include <bits/unicode.h>.
462 (__literal_encoding_is_utf8): Move to <bits/unicode.h>.
463 (_Spec::_M_fill): Change type to char32_t.
464 (_Spec::_M_parse_fill_and_align): Read a Unicode scalar value
465 instead of a single character.
466 (__write_padded): Change __fill_char parameter to char32_t and
467 encode it into the output.
468 (__formatter_str::format): Use new __unicode::__field_width and
469 __unicode::__truncate functions.
470 * include/std/ostream: Adjust namespace qualification for
471 __literal_encoding_is_utf8.
472 * include/std/print: Likewise.
473 * src/c++23/print.cc: Add [[unlikely]] attribute to error path.
474 * testsuite/ext/unicode/view.cc: New test.
475 * testsuite/std/format/functions/format.cc: Add missing examples
476 from the standard demonstrating alignment with non-ASCII
477 characters. Add examples checking correct handling of extended
480 2024-01-08 Jonathan Wakely <jwakely@redhat.com>
482 * include/bits/version.def (format_uchar): Define.
483 * include/bits/version.h: Regenerate.
484 * include/std/format (formatter<C, C>::format): Check for
485 _Pres_c and call _M_format_character directly. Cast C to its
486 unsigned equivalent for formatting as an integer.
487 (formatter<char, wchar_t>::format): Likewise.
488 (basic_format_arg(T&)): Store char arguments as unsigned char
489 for formatting to a wide string.
490 * testsuite/std/format/functions/format.cc: Adjust test. Check
493 2024-01-07 Jonathan Wakely <jwakely@redhat.com>
496 * libsupc++/unwind-cxx.h (__cxa_call_terminate): Change first
499 2024-01-07 Jonathan Wakely <jwakely@redhat.com>
501 * testsuite/20_util/variant/87619.cc: Remove dg-timeout-factor.
503 2024-01-07 Jonathan Wakely <jwakely@redhat.com>
505 * include/std/type_traits (is_trivially_destructible_v): Use
506 built-in directly when concepts are supported.
507 * testsuite/20_util/is_trivially_destructible/value_v.cc: New
510 2024-01-06 Gwenole Beauchesne <gb.devel@gmail.com>
512 * testsuite/tr1/8_c_compatibility/cinttypes/functions.cc: Use
513 nonnull arguments to strtoimax() and wcstoimax() functions.
515 2024-01-05 Jonathan Wakely <jwakely@redhat.com>
517 * src/c++17/fs_path.cc (path::_List::reserve): Limit maximum
518 size and check for overflows in arithmetic.
519 (path::operator/=(const path&)): Remove redundant exponential
522 2024-01-05 Martin Küttler <martin.kuettler@kernkonzept.com>
524 * src/c++17/fs_path.cc (path::_List::reserve): Avoid
525 floating-point arithmetic.
527 2024-01-05 Jonathan Wakely <jwakely@redhat.com>
530 * include/std/type_traits (is_convertible_v): Guard use of
531 built-in with preprocessor check.
533 2024-01-05 Jonathan Wakely <jwakely@redhat.com>
536 * include/bits/char_traits.h (__gnu_cxx::char_traits::move): Use
537 __builtin_constant_p to check for unrelated pointers that cannot
538 be compared during constant evaluation.
539 * testsuite/21_strings/char_traits/requirements/113200.cc: New
542 2024-01-05 Cassio Neri <cassio.neri@gmail.com>
544 * include/std/chrono: Fix + and - for months and weekdays.
545 * testsuite/std/time/month/1.cc: Add constexpr tests against overflow.
546 * testsuite/std/time/month/2.cc: New test for extreme values.
547 * testsuite/std/time/weekday/1.cc: Add constexpr tests against overflow.
548 * testsuite/std/time/weekday/2.cc: New test for extreme values.
550 2024-01-05 Jonathan Wakely <jwakely@redhat.com>
553 * include/bits/locale_classes.tcc (__try_use_facet): Use
554 if-constexpr for C++11 and up.
556 2024-01-05 Ken Matsui <kmatsui@gcc.gnu.org>
558 * include/std/type_traits: Use _GLIBCXX_USE_BUILTIN_TRAIT.
560 2024-01-04 Arsen Arsenović <arsen@aarsen.me>
562 * include/std/generator (_Subyield_state::_M_jump_in): Fix typo
563 reported by Will Hawkins <hawkinsw@obs.cr>.
565 2024-01-04 Arsen Arsenović <arsen@aarsen.me>
567 * include/std/generator (_Stateless_alloc): Rename typename _A
570 2024-01-03 Patrick Palka <ppalka@redhat.com>
573 * testsuite/std/ranges/iota/max_size_type.cc (test02): Reduce
574 'limit' to 100 from 1000 and adjust 'log2_limit' accordingly.
578 Copyright (C) 2024 Free Software Foundation, Inc.
580 Copying and distribution of this file, with or without modification,
581 are permitted in any medium without royalty provided the copyright
582 notice and this notice are preserved.