1 2024-01-30 Jonathan Wakely <jwakely@redhat.com>
3 * testsuite/std/time/clock/gps/io.cc: Fix expected result in
4 assertion and call test_format() from main.
6 2024-01-29 François Dumont <fdumont@gcc.gnu.org>
8 * doc/xml/manual/debug_mode.xml: Link against libstdc++exp.a to use
9 _GLIBCXX_DEBUG_BACKTRACE macro.
11 2024-01-24 Huanghui Nie <nnnjkk@gmail.com>
12 Théo Papadopoulo <papadopoulo@gmail.com>
14 * include/bits/hashtable.h (_Hahstable<>::_M_remove_bucket_begin): Remove
15 _M_before_begin check and cleanup implementation.
17 2024-01-22 Jonathan Wakely <jwakely@redhat.com>
19 * testsuite/std/time/clock/file/io.cc: Fix expected result in
20 assertion and call test_format() from main.
22 2024-01-21 Jonathan Wakely <jwakely@redhat.com>
25 * include/bits/chrono_io.h (__formatter_chrono::_M_S): Fix
26 printing of subseconds with floating-point rep.
27 (__formatter_chrono::_M_format_to_ostream): Do not write
28 time_point specializations directly to the ostream.
29 (formatter<chrono::sys_time<D>, C>::parse): Do not allow an
30 empty chrono-spec if the type fails to meet the constraints for
31 writing to an ostream with operator<<.
32 * testsuite/std/time/clock/file/io.cc: Check formatting
33 non-integral times with empty chrono-specs.
34 * testsuite/std/time/clock/gps/io.cc: Likewise.
35 * testsuite/std/time/clock/utc/io.cc: Likewise.
36 * testsuite/std/time/hh_mm_ss/io.cc: Likewise.
38 2024-01-21 Jonathan Wakely <jwakely@redhat.com>
40 * include/bits/chrono.h (__file_clock::from_sys)
41 (__file_clock::to_sys, __file_clock::_S_from_sys)
42 (__file_clock::_S_to_sys): Use common_type for return type.
43 * testsuite/std/time/clock/file/members.cc: Check round trip
44 conversion for time with lower precision that seconds.
46 2024-01-21 Jonathan Wakely <jwakely@redhat.com>
49 * include/std/format (__formatter_fp::format): Fix logic for
51 * testsuite/std/format/functions/format.cc: Check buggy cases of
52 alternate forms with g presentation type.
54 2024-01-20 Marek Polacek <polacek@redhat.com>
57 * include/std/ranges: Add #pragma to disable -Wdangling-reference with
58 std::ranges::views::__adaptor::operator|.
60 2024-01-19 Jonathan Wakely <jwakely@redhat.com>
62 * include/std/format (_Spec::_M_parse_fill_and_align): Do not
63 use CTAD for _Utf32_view.
65 2024-01-19 Jonathan Wakely <jwakely@redhat.com>
68 * include/std/tuple (__glibcxx_no_dangling_refs) [C++17]: Fix
70 * testsuite/20_util/tuple/dangling_ref.cc: Check tuples with one
71 element and three elements. Check allocator-extended
74 2024-01-19 Patrick Palka <ppalka@redhat.com>
76 * include/precompiled/stdc++.h [_GLIBCXX_HOSTED]: Include
77 <print> and <text_encoding> for C++23 and C++26 respectively.
79 2024-01-18 Patrick Palka <ppalka@redhat.com>
81 * include/bits/stl_pair.h [__cplusplus > 202002L]:
82 Guard P2321R2 changes with __glibcxx_ranges_zip instead.
84 2024-01-18 Patrick Palka <ppalka@redhat.com>
86 * include/std/tuple [__cplusplus > 202002L]: Guard P2321R2
87 changes with __cpp_lib_ranges_zip instead.
89 2024-01-18 Patrick Palka <ppalka@redhat.com>
92 * include/debug/safe_base.h (_Safe_sequence_base::_M_swap):
93 Remove _GLIBCXX20_CONSTEXPR from non-inline member function.
94 * include/debug/safe_iterator.h
95 (_GLIBCXX20_CONSTEXPR_NON_LITERAL_SCOPE_BEGIN): Define.
96 (_GLIBCXX20_CONSTEXPR_NON_LITERAL_SCOPE_END): Define.
97 (_Safe_iterator::operator=): Use them around the code path that
98 defines a variable of type __gnu_cxx::__scoped_lock.
99 (_Safe_iterator::operator++): Likewise.
100 (_Safe_iterator::operator--): Likewise.
101 (_Safe_iterator::operator+=): Likewise.
102 (_Safe_iterator::operator-=): Likewise.
103 * testsuite/23_containers/vector/element_access/constexpr.cc
104 (test_iterators): Test more iterator operations.
105 * testsuite/23_containers/vector/bool/element_access/constexpr.cc
106 (test_iterators): Likewise.
107 * testsuite/std/ranges/adaptors/all.cc (test08) [_GLIBCXX_DEBUG]:
110 2024-01-18 Jonathan Wakely <jwakely@redhat.com>
112 * include/bits/unicode.h (__charset_alias_match): Initialize
115 2024-01-18 Jonathan Wakely <jwakely@redhat.com>
118 * testsuite/std/format/functions/format.cc: Use signed char
121 2024-01-17 Jonathan Wakely <jwakely@redhat.com>
124 * acinclude.m4 (GLIBCXX_CONFIGURE): Add c++26 directory.
125 (GLIBCXX_CHECK_TEXT_ENCODING): Define.
126 * config.h.in: Regenerate.
127 * configure: Regenerate.
128 * configure.ac: Use GLIBCXX_CHECK_TEXT_ENCODING.
129 * include/Makefile.am: Add new headers.
130 * include/Makefile.in: Regenerate.
131 * include/bits/locale_classes.h (locale::encoding): Declare new
133 * include/bits/unicode.h (__charset_alias_match): New function.
134 * include/bits/text_encoding-data.h: New file.
135 * include/bits/version.def (text_encoding): Define.
136 * include/bits/version.h: Regenerate.
137 * include/std/text_encoding: New file.
138 * src/Makefile.am: Add new subdirectory.
139 * src/Makefile.in: Regenerate.
140 * src/c++26/Makefile.am: New file.
141 * src/c++26/Makefile.in: New file.
142 * src/c++26/text_encoding.cc: New file.
143 * src/experimental/Makefile.am: Include c++26 convenience
145 * src/experimental/Makefile.in: Regenerate.
146 * python/libstdcxx/v6/printers.py (StdTextEncodingPrinter): New
148 * scripts/gen_text_encoding_data.py: New file.
149 * testsuite/22_locale/locale/encoding.cc: New test.
150 * testsuite/ext/unicode/charset_alias_match.cc: New test.
151 * testsuite/std/text_encoding/cons.cc: New test.
152 * testsuite/std/text_encoding/members.cc: New test.
153 * testsuite/std/text_encoding/requirements.cc: New test.
155 2024-01-17 Jonathan Wakely <jwakely@redhat.com>
157 * include/bits/unicode.h (_Grapheme_cluster_view): Require view.
158 Do not use CTAD for _Utf32_view.
159 (__format_width, __truncate): Do not use CTAD.
160 (enable_borrowed_range<_Utf_view<T, R>>): Define specialization.
161 (enable_borrowed_range<_Grapheme_cluster_view<R>>): Likewise.
163 2024-01-17 Patrick Palka <ppalka@redhat.com>
165 * include/std/ranges (views::_CartesianProduct::operator()):
166 Adjust identity case as per P2540R1.
167 * testsuite/std/ranges/cartesian_product/1.cc (test01):
168 Adjust expected result of the identity case.
170 2024-01-15 Patrick Palka <ppalka@redhat.com>
172 * include/std/variant (__detail::__variant::_Variadic_union):
173 Add bool __trivially_destructible template parameter.
174 (__detail::__variant::_Variadic_union::~_Variadic_union):
175 Use __trivially_destructible in constraints instead.
176 (__detail::__variant::_Variant_storage): Pass
177 __trivially_destructible value to _Variadic_union.
179 2024-01-15 Patrick Palka <ppalka@redhat.com>
181 * include/bits/stl_iterator.h (const_iterator): Define conversion
182 operators as per P2836R1.
183 * include/bits/version.def (ranges_as_const): Update value.
184 * include/bits/version.h: Regenerate.
185 * testsuite/24_iterators/const_iterator/1.cc (test04): New test.
186 * testsuite/std/ranges/adaptors/as_const/1.cc: Adjust expected
187 value of __cpp_lib_ranges_as_const.
188 * testsuite/std/ranges/version_c++23.cc: Likewise.
190 2024-01-15 Jonathan Wakely <jwakely@redhat.com>
193 * include/std/tuple (__assignable, __is_nothrow_assignable):
194 Move pre-C++20 definitions adjacent to their use.
196 2024-01-15 Jonathan Wakely <jwakely@redhat.com>
199 * include/std/format (basic_format_arg): Use __formattable
200 variable template instead of __format::__formattable_with
203 2024-01-15 Jonathan Wakely <jwakely@redhat.com>
205 * src/c++20/tzdata.zi: Import new file from 2023d release.
206 * src/c++20/tzdb.cc (tzdb_list::_Node::_S_read_leap_seconds)
207 Update expiry date for leap seconds list.
209 2024-01-13 Jonathan Wakely <jwakely@redhat.com>
212 * include/std/tuple (tuple): Add checks for dangling references.
213 Reimplement constraints and constant expressions using C++20
215 * include/std/type_traits [C++20]
216 (__is_implicitly_default_constructible_v): Define.
217 (__is_implicitly_default_constructible): Use variable template.
218 * testsuite/20_util/tuple/dangling_ref.cc: New test.
220 2024-01-13 Patrick Palka <ppalka@redhat.com>
224 * include/bits/version.def (bind_back): Define.
225 * include/bits/version.h: Regenerate.
226 * include/std/functional (_Bind_back): Define for C++23.
227 (bind_back): Likewise.
228 * testsuite/20_util/function_objects/bind_back/1.cc: New test
229 (adapted from corresponding bind_front test).
230 * testsuite/20_util/function_objects/bind_back/111327.cc: Likewise.
232 2024-01-13 Patrick Palka <ppalka@redhat.com>
234 * include/std/functional (_Bind_front): Remove =default special
235 member function declarations.
236 (_Bind_front::operator()): Implement using C++23 deducing this
238 * testsuite/20_util/function_objects/bind_front/111327.cc:
239 Adjust testcase to expect better errors in C++23 mode.
241 2024-01-13 Patrick Palka <ppalka@redhat.com>
243 * include/std/ranges (views::__adaptor::operator|): Perform
244 perfect forwarding of arguments.
245 (views::__adaptor::_RangeAdaptor::operator()): Pass dummy
246 first argument to _Partial.
247 (views::__adaptor::_Partial::_Partial): Likewise. Add dummy
249 (views::__adaptor::_Pipe::_Pipe): Perform perfect forwarding
251 (to): Pass dummy first argument to _Partial.
253 2024-01-13 Jonathan Wakely <jwakely@redhat.com>
256 * include/bits/random.tcc (subtract_with_carry_engine::seed):
257 Implement proposed resolution of LWG 4014.
258 * testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error
260 * testsuite/26_numerics/random/subtract_with_carry_engine/cons/lwg3809.cc:
261 Check for expected result of 64-bit engine with seed that
262 doesn't fit in 32-bits.
264 2024-01-12 Jonathan Wakely <jwakely@redhat.com>
267 * include/std/format (__format::_Runtime_format_string): Add
268 constructor and disable copy operations.
269 (basic_format_string(_Runtime_format_string)): Add noexcept and
270 take parameter by value not rvalue reference.
271 (runtime_format): Add noexcept.
272 * testsuite/std/format/runtime_format.cc: Check noexcept. Check
273 that construction is only possible from prvalues, not xvalues.
275 2024-01-12 Jonathan Wakely <jwakely@redhat.com>
278 * include/bits/stl_pair.h (pair::pair(U1&&, U2&&)) [C++23]: Add
279 default template arguments, as per P1951R1.
280 * testsuite/20_util/pair/cons/default_tmpl_args.cc: New test.
282 2024-01-12 Jonathan Wakely <jwakely@redhat.com>
284 * include/std/format (__format::_Arg_store): Fix PR number in
285 comment. Simplify preprocessor code.
287 2024-01-11 Jonathan Wakely <jwakely@redhat.com>
289 * doc/xml/manual/evolution.xml: Fix spelling.
290 * doc/html/manual/api.html: Regenerate.
292 2024-01-11 Jonathan Wakely <jwakely@redhat.com>
294 * doc/xml/manual/evolution.xml: Document addition of
296 * doc/html/*: Regenerate.
298 2024-01-11 Marcus Haehnel <marcus.haehnel@kernkonzept.com>
300 * libsupc++/eh_unex_handler.cc: Adjust definition type to
303 2024-01-11 Michael Levine <mlevine55@bloomberg.net>
305 * include/std/ranges (__glibcxx_want_ranges_iota): Remove
306 duplicate definition.
308 2024-01-11 François Dumont <fdumont@gcc.gnu.org>
312 (_Safe_iterator_base::_M_attach): Reset _M_version to 0 if attaching to null
314 (_Safe_iterator_base::_M_attach_single): Likewise.
315 (_Safe_local_iterator_base::_M_attach): Likewise.
316 (_Safe_local_iterator_base::_M_attach_single): Likewise.
317 * testsuite/23_containers/map/debug/112477.cc: New test case.
319 2024-01-11 Patrick Palka <ppalka@redhat.com>
321 * include/bits/move.h (__like_t): Define in C++23 mode.
322 * include/std/ranges (views::__adaptor::Partial::operator()):
323 Implement using C++23 deducing this when available.
324 (views::__adaptor::_Pipe::operator()): Likewise.
325 * testsuite/std/ranges/adaptors/100577.cc: Adjust testcase to
326 accept new "no match for call" errors issued in C++23 mode.
327 * testsuite/std/ranges/adaptors/lazy_split_neg.cc: Likewise.
329 2024-01-11 Jonathan Wakely <jwakely@redhat.com>
331 * python/libstdcxx/v6/printers.py (StdIntegralConstantPrinter):
332 Add printer for std::integral_constant.
333 * testsuite/libstdc++-prettyprinters/cxx11.cc: Test it.
335 2024-01-11 Jonathan Wakely <jwakely@redhat.com>
338 * libsupc++/new_opa.cc: Prefer to use posix_memalign if
341 2024-01-11 Ken Matsui <kmatsui@gcc.gnu.org>
343 * src/filesystem/ops-common.h (stat_type): Use using.
345 2024-01-11 Ken Matsui <kmatsui@gcc.gnu.org>
348 * src/c++17/fs_ops.cc (fs::equivalent): Use || instead of &&.
349 * src/filesystem/ops.cc (fs::equivalent): Likewise.
350 * testsuite/27_io/filesystem/operations/equivalent.cc: Handle
352 * testsuite/experimental/filesystem/operations/equivalent.cc:
355 2024-01-11 Ken Matsui <kmatsui@gcc.gnu.org>
357 * include/std/type_traits (is_compound): Do not use __not_.
358 (is_compound_v): Use is_fundamental_v instead.
360 2024-01-11 Patrick Palka <ppalka@redhat.com>
362 * include/bits/utility.h (_Nth_type): Use
363 _GLIBCXX_USE_BUILTIN_TRAIT instead of __has_builtin.
365 2024-01-09 Jonathan Wakely <jwakely@redhat.com>
367 * include/bits/unicode-data.h: Regenerate.
368 * include/bits/unicode.h (_Utf_iterator::operator++()): Fix off
370 (__incb_property): Add missing check for values before the
372 (__is_extended_pictographic): Invert return values to fix
374 (_Grapheme_cluster_view::_Iterator): Remove second iterator
375 member and find end of cluster lazily.
376 * testsuite/ext/unicode/grapheme_view.cc: New test.
377 * testsuite/ext/unicode/properties.cc: New test.
378 * testsuite/ext/unicode/view.cc: New test.
380 2024-01-09 Andreas Schwab <schwab@linux-m68k.org>
382 * scripts/extract_symvers.in: Require final colon to only match
383 .dsynsym in the header of the dynamic symtab.
385 2024-01-09 Jonathan Wakely <jwakely@redhat.com>
387 * include/bits/chrono_io.h (__formatter_chrono::_M_F): Simplify
388 handling of string returned from std::format.
389 (__formatter_chrono::_M_R_T): Likewise.
391 2024-01-08 Jonathan Wakely <jwakely@redhat.com>
393 * include/bits/unicode.h (__null_sentinel): Remove.
394 * testsuite/17_intro/names.cc: Add __null_sentinel.
396 2024-01-08 Jonathan Wakely <jwakely@redhat.com>
398 * include/std/format (__format::_Runtime_format_string): Define
400 (basic_format_string): Add non-consteval constructor for runtime
402 (runtime_format): Define new function for C++26.
403 * testsuite/std/format/runtime_format.cc: New test.
405 2024-01-08 Jonathan Wakely <jwakely@redhat.com>
407 * include/bits/chrono_io.h (__formatter_chrono): Always use
408 lvalue arguments to make_format_args.
409 * include/std/format (make_format_args): Change parameter pack
410 from forwarding references to lvalue references. Remove use of
411 remove_reference_t which is now unnecessary.
412 (format_to, formatted_size): Remove incorrect forwarding of
414 * include/std/ostream (print): Remove forwarding of arguments.
415 * include/std/print (print): Likewise.
416 * testsuite/20_util/duration/io.cc: Use lvalues as arguments to
418 * testsuite/std/format/arguments/args.cc: Likewise.
419 * testsuite/std/format/arguments/lwg3810.cc: Likewise.
420 * testsuite/std/format/functions/format.cc: Likewise.
421 * testsuite/std/format/functions/vformat_to.cc: Likewise.
422 * testsuite/std/format/string.cc: Likewise.
423 * testsuite/std/time/day/io.cc: Likewise.
424 * testsuite/std/time/month/io.cc: Likewise.
425 * testsuite/std/time/weekday/io.cc: Likewise.
426 * testsuite/std/time/year/io.cc: Likewise.
427 * testsuite/std/time/year_month_day/io.cc: Likewise.
428 * testsuite/std/format/arguments/args_neg.cc: New test.
430 2024-01-08 Jonathan Wakely <jwakely@redhat.com>
432 * include/Makefile.am: Add new headers.
433 * include/Makefile.in: Regenerate.
434 * include/bits/unicode.h: New file.
435 * include/bits/unicode-data.h: New file.
436 * include/std/format: Include <bits/unicode.h>.
437 (__literal_encoding_is_utf8): Move to <bits/unicode.h>.
438 (_Spec::_M_fill): Change type to char32_t.
439 (_Spec::_M_parse_fill_and_align): Read a Unicode scalar value
440 instead of a single character.
441 (__write_padded): Change __fill_char parameter to char32_t and
442 encode it into the output.
443 (__formatter_str::format): Use new __unicode::__field_width and
444 __unicode::__truncate functions.
445 * include/std/ostream: Adjust namespace qualification for
446 __literal_encoding_is_utf8.
447 * include/std/print: Likewise.
448 * src/c++23/print.cc: Add [[unlikely]] attribute to error path.
449 * testsuite/ext/unicode/view.cc: New test.
450 * testsuite/std/format/functions/format.cc: Add missing examples
451 from the standard demonstrating alignment with non-ASCII
452 characters. Add examples checking correct handling of extended
455 2024-01-08 Jonathan Wakely <jwakely@redhat.com>
457 * include/bits/version.def (format_uchar): Define.
458 * include/bits/version.h: Regenerate.
459 * include/std/format (formatter<C, C>::format): Check for
460 _Pres_c and call _M_format_character directly. Cast C to its
461 unsigned equivalent for formatting as an integer.
462 (formatter<char, wchar_t>::format): Likewise.
463 (basic_format_arg(T&)): Store char arguments as unsigned char
464 for formatting to a wide string.
465 * testsuite/std/format/functions/format.cc: Adjust test. Check
468 2024-01-07 Jonathan Wakely <jwakely@redhat.com>
471 * libsupc++/unwind-cxx.h (__cxa_call_terminate): Change first
474 2024-01-07 Jonathan Wakely <jwakely@redhat.com>
476 * testsuite/20_util/variant/87619.cc: Remove dg-timeout-factor.
478 2024-01-07 Jonathan Wakely <jwakely@redhat.com>
480 * include/std/type_traits (is_trivially_destructible_v): Use
481 built-in directly when concepts are supported.
482 * testsuite/20_util/is_trivially_destructible/value_v.cc: New
485 2024-01-06 Gwenole Beauchesne <gb.devel@gmail.com>
487 * testsuite/tr1/8_c_compatibility/cinttypes/functions.cc: Use
488 nonnull arguments to strtoimax() and wcstoimax() functions.
490 2024-01-05 Jonathan Wakely <jwakely@redhat.com>
492 * src/c++17/fs_path.cc (path::_List::reserve): Limit maximum
493 size and check for overflows in arithmetic.
494 (path::operator/=(const path&)): Remove redundant exponential
497 2024-01-05 Martin Küttler <martin.kuettler@kernkonzept.com>
499 * src/c++17/fs_path.cc (path::_List::reserve): Avoid
500 floating-point arithmetic.
502 2024-01-05 Jonathan Wakely <jwakely@redhat.com>
505 * include/std/type_traits (is_convertible_v): Guard use of
506 built-in with preprocessor check.
508 2024-01-05 Jonathan Wakely <jwakely@redhat.com>
511 * include/bits/char_traits.h (__gnu_cxx::char_traits::move): Use
512 __builtin_constant_p to check for unrelated pointers that cannot
513 be compared during constant evaluation.
514 * testsuite/21_strings/char_traits/requirements/113200.cc: New
517 2024-01-05 Cassio Neri <cassio.neri@gmail.com>
519 * include/std/chrono: Fix + and - for months and weekdays.
520 * testsuite/std/time/month/1.cc: Add constexpr tests against overflow.
521 * testsuite/std/time/month/2.cc: New test for extreme values.
522 * testsuite/std/time/weekday/1.cc: Add constexpr tests against overflow.
523 * testsuite/std/time/weekday/2.cc: New test for extreme values.
525 2024-01-05 Jonathan Wakely <jwakely@redhat.com>
528 * include/bits/locale_classes.tcc (__try_use_facet): Use
529 if-constexpr for C++11 and up.
531 2024-01-05 Ken Matsui <kmatsui@gcc.gnu.org>
533 * include/std/type_traits: Use _GLIBCXX_USE_BUILTIN_TRAIT.
535 2024-01-04 Arsen Arsenović <arsen@aarsen.me>
537 * include/std/generator (_Subyield_state::_M_jump_in): Fix typo
538 reported by Will Hawkins <hawkinsw@obs.cr>.
540 2024-01-04 Arsen Arsenović <arsen@aarsen.me>
542 * include/std/generator (_Stateless_alloc): Rename typename _A
545 2024-01-03 Patrick Palka <ppalka@redhat.com>
548 * testsuite/std/ranges/iota/max_size_type.cc (test02): Reduce
549 'limit' to 100 from 1000 and adjust 'log2_limit' accordingly.
553 Copyright (C) 2024 Free Software Foundation, Inc.
555 Copying and distribution of this file, with or without modification,
556 are permitted in any medium without royalty provided the copyright
557 notice and this notice are preserved.