Fix dg-warning on hppa*64*-*-*
[official-gcc.git] / libstdc++-v3 / ChangeLog
bloba6bc024e03e91601edbbc25d82e6c7921f2d2871
1 2024-01-13  Jonathan Wakely  <jwakely@redhat.com>
3         PR libstdc++/108822
4         * include/std/tuple (tuple): Add checks for dangling references.
5         Reimplement constraints and constant expressions using C++20
6         features.
7         * include/std/type_traits [C++20]
8         (__is_implicitly_default_constructible_v): Define.
9         (__is_implicitly_default_constructible): Use variable template.
10         * testsuite/20_util/tuple/dangling_ref.cc: New test.
12 2024-01-13  Patrick Palka  <ppalka@redhat.com>
14         PR libstdc++/108827
15         PR libstdc++/111327
16         * include/bits/version.def (bind_back): Define.
17         * include/bits/version.h: Regenerate.
18         * include/std/functional (_Bind_back): Define for C++23.
19         (bind_back): Likewise.
20         * testsuite/20_util/function_objects/bind_back/1.cc: New test
21         (adapted from corresponding bind_front test).
22         * testsuite/20_util/function_objects/bind_back/111327.cc: Likewise.
24 2024-01-13  Patrick Palka  <ppalka@redhat.com>
26         * include/std/functional (_Bind_front): Remove =default special
27         member function declarations.
28         (_Bind_front::operator()): Implement using C++23 deducing this
29         when available.
30         * testsuite/20_util/function_objects/bind_front/111327.cc:
31         Adjust testcase to expect better errors in C++23 mode.
33 2024-01-13  Patrick Palka  <ppalka@redhat.com>
35         * include/std/ranges (views::__adaptor::operator|): Perform
36         perfect forwarding of arguments.
37         (views::__adaptor::_RangeAdaptor::operator()): Pass dummy
38         first argument to _Partial.
39         (views::__adaptor::_Partial::_Partial): Likewise.  Add dummy
40         first parameter.
41         (views::__adaptor::_Pipe::_Pipe): Perform perfect forwarding
42         of arguments.
43         (to): Pass dummy first argument to _Partial.
45 2024-01-13  Jonathan Wakely  <jwakely@redhat.com>
47         PR libstdc++/107466
48         * include/bits/random.tcc (subtract_with_carry_engine::seed):
49         Implement proposed resolution of LWG 4014.
50         * testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error
51         line number.
52         * testsuite/26_numerics/random/subtract_with_carry_engine/cons/lwg3809.cc:
53         Check for expected result of 64-bit engine with seed that
54         doesn't fit in 32-bits.
56 2024-01-12  Jonathan Wakely  <jwakely@redhat.com>
58         PR libstdc++/113320
59         * include/std/format (__format::_Runtime_format_string): Add
60         constructor and disable copy operations.
61         (basic_format_string(_Runtime_format_string)): Add noexcept and
62         take parameter by value not rvalue reference.
63         (runtime_format): Add noexcept.
64         * testsuite/std/format/runtime_format.cc: Check noexcept. Check
65         that construction is only possible from prvalues, not xvalues.
67 2024-01-12  Jonathan Wakely  <jwakely@redhat.com>
69         PR libstdc++/105505
70         * include/bits/stl_pair.h (pair::pair(U1&&, U2&&)) [C++23]: Add
71         default template arguments, as per P1951R1.
72         * testsuite/20_util/pair/cons/default_tmpl_args.cc: New test.
74 2024-01-12  Jonathan Wakely  <jwakely@redhat.com>
76         * include/std/format (__format::_Arg_store): Fix PR number in
77         comment. Simplify preprocessor code.
79 2024-01-11  Jonathan Wakely  <jwakely@redhat.com>
81         * doc/xml/manual/evolution.xml: Fix spelling.
82         * doc/html/manual/api.html: Regenerate.
84 2024-01-11  Jonathan Wakely  <jwakely@redhat.com>
86         * doc/xml/manual/evolution.xml: Document addition of
87         libstdc++exp.a.
88         * doc/html/*: Regenerate.
90 2024-01-11  Marcus Haehnel  <marcus.haehnel@kernkonzept.com>
92         * libsupc++/eh_unex_handler.cc: Adjust definition type to
93         declaration.
95 2024-01-11  Michael Levine  <mlevine55@bloomberg.net>
97         * include/std/ranges (__glibcxx_want_ranges_iota): Remove
98         duplicate definition.
100 2024-01-11  François Dumont  <fdumont@gcc.gnu.org>
102         PR libstdc++/112477
103         * src/c++11/debug.cc
104         (_Safe_iterator_base::_M_attach): Reset _M_version to 0 if attaching to null
105         sequence.
106         (_Safe_iterator_base::_M_attach_single): Likewise.
107         (_Safe_local_iterator_base::_M_attach): Likewise.
108         (_Safe_local_iterator_base::_M_attach_single): Likewise.
109         * testsuite/23_containers/map/debug/112477.cc: New test case.
111 2024-01-11  Patrick Palka  <ppalka@redhat.com>
113         * include/bits/move.h (__like_t): Define in C++23 mode.
114         * include/std/ranges (views::__adaptor::Partial::operator()):
115         Implement using C++23 deducing this when available.
116         (views::__adaptor::_Pipe::operator()): Likewise.
117         * testsuite/std/ranges/adaptors/100577.cc: Adjust testcase to
118         accept new "no match for call" errors issued in C++23 mode.
119         * testsuite/std/ranges/adaptors/lazy_split_neg.cc: Likewise.
121 2024-01-11  Jonathan Wakely  <jwakely@redhat.com>
123         * python/libstdcxx/v6/printers.py (StdIntegralConstantPrinter):
124         Add printer for std::integral_constant.
125         * testsuite/libstdc++-prettyprinters/cxx11.cc: Test it.
127 2024-01-11  Jonathan Wakely  <jwakely@redhat.com>
129         PR libstdc++/113258
130         * libsupc++/new_opa.cc: Prefer to use posix_memalign if
131         available.
133 2024-01-11  Ken Matsui  <kmatsui@gcc.gnu.org>
135         * src/filesystem/ops-common.h (stat_type): Use using.
137 2024-01-11  Ken Matsui  <kmatsui@gcc.gnu.org>
139         PR libstdc++/113250
140         * src/c++17/fs_ops.cc (fs::equivalent): Use || instead of &&.
141         * src/filesystem/ops.cc (fs::equivalent): Likewise.
142         * testsuite/27_io/filesystem/operations/equivalent.cc: Handle
143         error codes.
144         * testsuite/experimental/filesystem/operations/equivalent.cc:
145         Likewise.
147 2024-01-11  Ken Matsui  <kmatsui@gcc.gnu.org>
149         * include/std/type_traits (is_compound): Do not use __not_.
150         (is_compound_v): Use is_fundamental_v instead.
152 2024-01-11  Patrick Palka  <ppalka@redhat.com>
154         * include/bits/utility.h (_Nth_type): Use
155         _GLIBCXX_USE_BUILTIN_TRAIT instead of __has_builtin.
157 2024-01-09  Jonathan Wakely  <jwakely@redhat.com>
159         * include/bits/unicode-data.h: Regenerate.
160         * include/bits/unicode.h (_Utf_iterator::operator++()): Fix off
161         by one error.
162         (__incb_property): Add missing check for values before the
163         first edge.
164         (__is_extended_pictographic): Invert return values to fix
165         copy&pasted logic.
166         (_Grapheme_cluster_view::_Iterator): Remove second iterator
167         member and find end of cluster lazily.
168         * testsuite/ext/unicode/grapheme_view.cc: New test.
169         * testsuite/ext/unicode/properties.cc: New test.
170         * testsuite/ext/unicode/view.cc: New test.
172 2024-01-09  Andreas Schwab  <schwab@linux-m68k.org>
174         * scripts/extract_symvers.in: Require final colon to only match
175         .dsynsym in the header of the dynamic symtab.
177 2024-01-09  Jonathan Wakely  <jwakely@redhat.com>
179         * include/bits/chrono_io.h (__formatter_chrono::_M_F): Simplify
180         handling of string returned from std::format.
181         (__formatter_chrono::_M_R_T): Likewise.
183 2024-01-08  Jonathan Wakely  <jwakely@redhat.com>
185         * include/bits/unicode.h (__null_sentinel): Remove.
186         * testsuite/17_intro/names.cc: Add __null_sentinel.
188 2024-01-08  Jonathan Wakely  <jwakely@redhat.com>
190         * include/std/format (__format::_Runtime_format_string): Define
191         new class template.
192         (basic_format_string): Add non-consteval constructor for runtime
193         format strings.
194         (runtime_format): Define new function for C++26.
195         * testsuite/std/format/runtime_format.cc: New test.
197 2024-01-08  Jonathan Wakely  <jwakely@redhat.com>
199         * include/bits/chrono_io.h (__formatter_chrono): Always use
200         lvalue arguments to make_format_args.
201         * include/std/format (make_format_args): Change parameter pack
202         from forwarding references to lvalue references. Remove use of
203         remove_reference_t which is now unnecessary.
204         (format_to, formatted_size): Remove incorrect forwarding of
205         arguments.
206         * include/std/ostream (print): Remove forwarding of arguments.
207         * include/std/print (print): Likewise.
208         * testsuite/20_util/duration/io.cc: Use lvalues as arguments to
209         make_format_args.
210         * testsuite/std/format/arguments/args.cc: Likewise.
211         * testsuite/std/format/arguments/lwg3810.cc: Likewise.
212         * testsuite/std/format/functions/format.cc: Likewise.
213         * testsuite/std/format/functions/vformat_to.cc: Likewise.
214         * testsuite/std/format/string.cc: Likewise.
215         * testsuite/std/time/day/io.cc: Likewise.
216         * testsuite/std/time/month/io.cc: Likewise.
217         * testsuite/std/time/weekday/io.cc: Likewise.
218         * testsuite/std/time/year/io.cc: Likewise.
219         * testsuite/std/time/year_month_day/io.cc: Likewise.
220         * testsuite/std/format/arguments/args_neg.cc: New test.
222 2024-01-08  Jonathan Wakely  <jwakely@redhat.com>
224         * include/Makefile.am: Add new headers.
225         * include/Makefile.in: Regenerate.
226         * include/bits/unicode.h: New file.
227         * include/bits/unicode-data.h: New file.
228         * include/std/format: Include <bits/unicode.h>.
229         (__literal_encoding_is_utf8): Move to <bits/unicode.h>.
230         (_Spec::_M_fill): Change type to char32_t.
231         (_Spec::_M_parse_fill_and_align): Read a Unicode scalar value
232         instead of a single character.
233         (__write_padded): Change __fill_char parameter to char32_t and
234         encode it into the output.
235         (__formatter_str::format): Use new __unicode::__field_width and
236         __unicode::__truncate functions.
237         * include/std/ostream: Adjust namespace qualification for
238         __literal_encoding_is_utf8.
239         * include/std/print: Likewise.
240         * src/c++23/print.cc: Add [[unlikely]] attribute to error path.
241         * testsuite/ext/unicode/view.cc: New test.
242         * testsuite/std/format/functions/format.cc: Add missing examples
243         from the standard demonstrating alignment with non-ASCII
244         characters. Add examples checking correct handling of extended
245         grapheme clusters.
247 2024-01-08  Jonathan Wakely  <jwakely@redhat.com>
249         * include/bits/version.def (format_uchar): Define.
250         * include/bits/version.h: Regenerate.
251         * include/std/format (formatter<C, C>::format): Check for
252         _Pres_c and call _M_format_character directly. Cast C to its
253         unsigned equivalent for formatting as an integer.
254         (formatter<char, wchar_t>::format): Likewise.
255         (basic_format_arg(T&)): Store char arguments as unsigned char
256         for formatting to a wide string.
257         * testsuite/std/format/functions/format.cc: Adjust test. Check
258         formatting of
260 2024-01-07  Jonathan Wakely  <jwakely@redhat.com>
262         PR libstdc++/112997
263         * libsupc++/unwind-cxx.h (__cxa_call_terminate): Change first
264         parameter to void*.
266 2024-01-07  Jonathan Wakely  <jwakely@redhat.com>
268         * testsuite/20_util/variant/87619.cc: Remove dg-timeout-factor.
270 2024-01-07  Jonathan Wakely  <jwakely@redhat.com>
272         * include/std/type_traits (is_trivially_destructible_v): Use
273         built-in directly when concepts are supported.
274         * testsuite/20_util/is_trivially_destructible/value_v.cc: New
275         test.
277 2024-01-06  Gwenole Beauchesne  <gb.devel@gmail.com>
279         * testsuite/tr1/8_c_compatibility/cinttypes/functions.cc: Use
280         nonnull arguments to strtoimax() and wcstoimax() functions.
282 2024-01-05  Jonathan Wakely  <jwakely@redhat.com>
284         * src/c++17/fs_path.cc (path::_List::reserve): Limit maximum
285         size and check for overflows in arithmetic.
286         (path::operator/=(const path&)): Remove redundant exponential
287         growth calculation.
289 2024-01-05  Martin Küttler  <martin.kuettler@kernkonzept.com>
291         * src/c++17/fs_path.cc (path::_List::reserve): Avoid
292         floating-point arithmetic.
294 2024-01-05  Jonathan Wakely  <jwakely@redhat.com>
296         PR libstdc++/113241
297         * include/std/type_traits (is_convertible_v): Guard use of
298         built-in with preprocessor check.
300 2024-01-05  Jonathan Wakely  <jwakely@redhat.com>
302         PR libstdc++/113200
303         * include/bits/char_traits.h (__gnu_cxx::char_traits::move): Use
304         __builtin_constant_p to check for unrelated pointers that cannot
305         be compared during constant evaluation.
306         * testsuite/21_strings/char_traits/requirements/113200.cc: New
307         test.
309 2024-01-05  Cassio Neri  <cassio.neri@gmail.com>
311         * include/std/chrono: Fix + and - for months and weekdays.
312         * testsuite/std/time/month/1.cc: Add constexpr tests against overflow.
313         * testsuite/std/time/month/2.cc: New test for extreme values.
314         * testsuite/std/time/weekday/1.cc: Add constexpr tests against overflow.
315         * testsuite/std/time/weekday/2.cc: New test for extreme values.
317 2024-01-05  Jonathan Wakely  <jwakely@redhat.com>
319         PR libstdc++/113099
320         * include/bits/locale_classes.tcc (__try_use_facet): Use
321         if-constexpr for C++11 and up.
323 2024-01-05  Ken Matsui  <kmatsui@gcc.gnu.org>
325         * include/std/type_traits: Use _GLIBCXX_USE_BUILTIN_TRAIT.
327 2024-01-04  Arsen Arsenović  <arsen@aarsen.me>
329         * include/std/generator (_Subyield_state::_M_jump_in): Fix typo
330         reported by Will Hawkins <hawkinsw@obs.cr>.
332 2024-01-04  Arsen Arsenović  <arsen@aarsen.me>
334         * include/std/generator (_Stateless_alloc): Rename typename _A
335         to _All.
337 2024-01-03  Patrick Palka  <ppalka@redhat.com>
339         PR testsuite/113175
340         * testsuite/std/ranges/iota/max_size_type.cc (test02): Reduce
341         'limit' to 100 from 1000 and adjust 'log2_limit' accordingly.
342         (test03): Likewise.
345 Copyright (C) 2024 Free Software Foundation, Inc.
347 Copying and distribution of this file, with or without modification,
348 are permitted in any medium without royalty provided the copyright
349 notice and this notice are preserved.