hppa: Always enable PIE on 64-bit target
[official-gcc.git] / libstdc++-v3 / ChangeLog
blobfb5474c0da65f5146a070c778a443fcbd4ec49fa
1 2024-01-17  Jonathan Wakely  <jwakely@redhat.com>
3         PR libstdc++/113318
4         * acinclude.m4 (GLIBCXX_CONFIGURE): Add c++26 directory.
5         (GLIBCXX_CHECK_TEXT_ENCODING): Define.
6         * config.h.in: Regenerate.
7         * configure: Regenerate.
8         * configure.ac: Use GLIBCXX_CHECK_TEXT_ENCODING.
9         * include/Makefile.am: Add new headers.
10         * include/Makefile.in: Regenerate.
11         * include/bits/locale_classes.h (locale::encoding): Declare new
12         member function.
13         * include/bits/unicode.h (__charset_alias_match): New function.
14         * include/bits/text_encoding-data.h: New file.
15         * include/bits/version.def (text_encoding): Define.
16         * include/bits/version.h: Regenerate.
17         * include/std/text_encoding: New file.
18         * src/Makefile.am: Add new subdirectory.
19         * src/Makefile.in: Regenerate.
20         * src/c++26/Makefile.am: New file.
21         * src/c++26/Makefile.in: New file.
22         * src/c++26/text_encoding.cc: New file.
23         * src/experimental/Makefile.am: Include c++26 convenience
24         library.
25         * src/experimental/Makefile.in: Regenerate.
26         * python/libstdcxx/v6/printers.py (StdTextEncodingPrinter): New
27         printer.
28         * scripts/gen_text_encoding_data.py: New file.
29         * testsuite/22_locale/locale/encoding.cc: New test.
30         * testsuite/ext/unicode/charset_alias_match.cc: New test.
31         * testsuite/std/text_encoding/cons.cc: New test.
32         * testsuite/std/text_encoding/members.cc: New test.
33         * testsuite/std/text_encoding/requirements.cc: New test.
35 2024-01-17  Jonathan Wakely  <jwakely@redhat.com>
37         * include/bits/unicode.h (_Grapheme_cluster_view): Require view.
38         Do not use CTAD for _Utf32_view.
39         (__format_width, __truncate): Do not use CTAD.
40         (enable_borrowed_range<_Utf_view<T, R>>): Define specialization.
41         (enable_borrowed_range<_Grapheme_cluster_view<R>>): Likewise.
43 2024-01-17  Patrick Palka  <ppalka@redhat.com>
45         * include/std/ranges (views::_CartesianProduct::operator()):
46         Adjust identity case as per P2540R1.
47         * testsuite/std/ranges/cartesian_product/1.cc (test01):
48         Adjust expected result of the identity case.
50 2024-01-15  Patrick Palka  <ppalka@redhat.com>
52         * include/std/variant (__detail::__variant::_Variadic_union):
53         Add bool __trivially_destructible template parameter.
54         (__detail::__variant::_Variadic_union::~_Variadic_union):
55         Use __trivially_destructible in constraints instead.
56         (__detail::__variant::_Variant_storage): Pass
57         __trivially_destructible value to _Variadic_union.
59 2024-01-15  Patrick Palka  <ppalka@redhat.com>
61         * include/bits/stl_iterator.h (const_iterator): Define conversion
62         operators as per P2836R1.
63         * include/bits/version.def (ranges_as_const): Update value.
64         * include/bits/version.h: Regenerate.
65         * testsuite/24_iterators/const_iterator/1.cc (test04): New test.
66         * testsuite/std/ranges/adaptors/as_const/1.cc: Adjust expected
67         value of __cpp_lib_ranges_as_const.
68         * testsuite/std/ranges/version_c++23.cc: Likewise.
70 2024-01-15  Jonathan Wakely  <jwakely@redhat.com>
72         PR libstdc++/108822
73         * include/std/tuple (__assignable, __is_nothrow_assignable):
74         Move pre-C++20 definitions adjacent to their use.
76 2024-01-15  Jonathan Wakely  <jwakely@redhat.com>
78         PR testsuite/113366
79         * include/std/format (basic_format_arg): Use __formattable
80         variable template instead of __format::__formattable_with
81         concept.
83 2024-01-15  Jonathan Wakely  <jwakely@redhat.com>
85         * src/c++20/tzdata.zi: Import new file from 2023d release.
86         * src/c++20/tzdb.cc (tzdb_list::_Node::_S_read_leap_seconds)
87         Update expiry date for leap seconds list.
89 2024-01-13  Jonathan Wakely  <jwakely@redhat.com>
91         PR libstdc++/108822
92         * include/std/tuple (tuple): Add checks for dangling references.
93         Reimplement constraints and constant expressions using C++20
94         features.
95         * include/std/type_traits [C++20]
96         (__is_implicitly_default_constructible_v): Define.
97         (__is_implicitly_default_constructible): Use variable template.
98         * testsuite/20_util/tuple/dangling_ref.cc: New test.
100 2024-01-13  Patrick Palka  <ppalka@redhat.com>
102         PR libstdc++/108827
103         PR libstdc++/111327
104         * include/bits/version.def (bind_back): Define.
105         * include/bits/version.h: Regenerate.
106         * include/std/functional (_Bind_back): Define for C++23.
107         (bind_back): Likewise.
108         * testsuite/20_util/function_objects/bind_back/1.cc: New test
109         (adapted from corresponding bind_front test).
110         * testsuite/20_util/function_objects/bind_back/111327.cc: Likewise.
112 2024-01-13  Patrick Palka  <ppalka@redhat.com>
114         * include/std/functional (_Bind_front): Remove =default special
115         member function declarations.
116         (_Bind_front::operator()): Implement using C++23 deducing this
117         when available.
118         * testsuite/20_util/function_objects/bind_front/111327.cc:
119         Adjust testcase to expect better errors in C++23 mode.
121 2024-01-13  Patrick Palka  <ppalka@redhat.com>
123         * include/std/ranges (views::__adaptor::operator|): Perform
124         perfect forwarding of arguments.
125         (views::__adaptor::_RangeAdaptor::operator()): Pass dummy
126         first argument to _Partial.
127         (views::__adaptor::_Partial::_Partial): Likewise.  Add dummy
128         first parameter.
129         (views::__adaptor::_Pipe::_Pipe): Perform perfect forwarding
130         of arguments.
131         (to): Pass dummy first argument to _Partial.
133 2024-01-13  Jonathan Wakely  <jwakely@redhat.com>
135         PR libstdc++/107466
136         * include/bits/random.tcc (subtract_with_carry_engine::seed):
137         Implement proposed resolution of LWG 4014.
138         * testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error
139         line number.
140         * testsuite/26_numerics/random/subtract_with_carry_engine/cons/lwg3809.cc:
141         Check for expected result of 64-bit engine with seed that
142         doesn't fit in 32-bits.
144 2024-01-12  Jonathan Wakely  <jwakely@redhat.com>
146         PR libstdc++/113320
147         * include/std/format (__format::_Runtime_format_string): Add
148         constructor and disable copy operations.
149         (basic_format_string(_Runtime_format_string)): Add noexcept and
150         take parameter by value not rvalue reference.
151         (runtime_format): Add noexcept.
152         * testsuite/std/format/runtime_format.cc: Check noexcept. Check
153         that construction is only possible from prvalues, not xvalues.
155 2024-01-12  Jonathan Wakely  <jwakely@redhat.com>
157         PR libstdc++/105505
158         * include/bits/stl_pair.h (pair::pair(U1&&, U2&&)) [C++23]: Add
159         default template arguments, as per P1951R1.
160         * testsuite/20_util/pair/cons/default_tmpl_args.cc: New test.
162 2024-01-12  Jonathan Wakely  <jwakely@redhat.com>
164         * include/std/format (__format::_Arg_store): Fix PR number in
165         comment. Simplify preprocessor code.
167 2024-01-11  Jonathan Wakely  <jwakely@redhat.com>
169         * doc/xml/manual/evolution.xml: Fix spelling.
170         * doc/html/manual/api.html: Regenerate.
172 2024-01-11  Jonathan Wakely  <jwakely@redhat.com>
174         * doc/xml/manual/evolution.xml: Document addition of
175         libstdc++exp.a.
176         * doc/html/*: Regenerate.
178 2024-01-11  Marcus Haehnel  <marcus.haehnel@kernkonzept.com>
180         * libsupc++/eh_unex_handler.cc: Adjust definition type to
181         declaration.
183 2024-01-11  Michael Levine  <mlevine55@bloomberg.net>
185         * include/std/ranges (__glibcxx_want_ranges_iota): Remove
186         duplicate definition.
188 2024-01-11  François Dumont  <fdumont@gcc.gnu.org>
190         PR libstdc++/112477
191         * src/c++11/debug.cc
192         (_Safe_iterator_base::_M_attach): Reset _M_version to 0 if attaching to null
193         sequence.
194         (_Safe_iterator_base::_M_attach_single): Likewise.
195         (_Safe_local_iterator_base::_M_attach): Likewise.
196         (_Safe_local_iterator_base::_M_attach_single): Likewise.
197         * testsuite/23_containers/map/debug/112477.cc: New test case.
199 2024-01-11  Patrick Palka  <ppalka@redhat.com>
201         * include/bits/move.h (__like_t): Define in C++23 mode.
202         * include/std/ranges (views::__adaptor::Partial::operator()):
203         Implement using C++23 deducing this when available.
204         (views::__adaptor::_Pipe::operator()): Likewise.
205         * testsuite/std/ranges/adaptors/100577.cc: Adjust testcase to
206         accept new "no match for call" errors issued in C++23 mode.
207         * testsuite/std/ranges/adaptors/lazy_split_neg.cc: Likewise.
209 2024-01-11  Jonathan Wakely  <jwakely@redhat.com>
211         * python/libstdcxx/v6/printers.py (StdIntegralConstantPrinter):
212         Add printer for std::integral_constant.
213         * testsuite/libstdc++-prettyprinters/cxx11.cc: Test it.
215 2024-01-11  Jonathan Wakely  <jwakely@redhat.com>
217         PR libstdc++/113258
218         * libsupc++/new_opa.cc: Prefer to use posix_memalign if
219         available.
221 2024-01-11  Ken Matsui  <kmatsui@gcc.gnu.org>
223         * src/filesystem/ops-common.h (stat_type): Use using.
225 2024-01-11  Ken Matsui  <kmatsui@gcc.gnu.org>
227         PR libstdc++/113250
228         * src/c++17/fs_ops.cc (fs::equivalent): Use || instead of &&.
229         * src/filesystem/ops.cc (fs::equivalent): Likewise.
230         * testsuite/27_io/filesystem/operations/equivalent.cc: Handle
231         error codes.
232         * testsuite/experimental/filesystem/operations/equivalent.cc:
233         Likewise.
235 2024-01-11  Ken Matsui  <kmatsui@gcc.gnu.org>
237         * include/std/type_traits (is_compound): Do not use __not_.
238         (is_compound_v): Use is_fundamental_v instead.
240 2024-01-11  Patrick Palka  <ppalka@redhat.com>
242         * include/bits/utility.h (_Nth_type): Use
243         _GLIBCXX_USE_BUILTIN_TRAIT instead of __has_builtin.
245 2024-01-09  Jonathan Wakely  <jwakely@redhat.com>
247         * include/bits/unicode-data.h: Regenerate.
248         * include/bits/unicode.h (_Utf_iterator::operator++()): Fix off
249         by one error.
250         (__incb_property): Add missing check for values before the
251         first edge.
252         (__is_extended_pictographic): Invert return values to fix
253         copy&pasted logic.
254         (_Grapheme_cluster_view::_Iterator): Remove second iterator
255         member and find end of cluster lazily.
256         * testsuite/ext/unicode/grapheme_view.cc: New test.
257         * testsuite/ext/unicode/properties.cc: New test.
258         * testsuite/ext/unicode/view.cc: New test.
260 2024-01-09  Andreas Schwab  <schwab@linux-m68k.org>
262         * scripts/extract_symvers.in: Require final colon to only match
263         .dsynsym in the header of the dynamic symtab.
265 2024-01-09  Jonathan Wakely  <jwakely@redhat.com>
267         * include/bits/chrono_io.h (__formatter_chrono::_M_F): Simplify
268         handling of string returned from std::format.
269         (__formatter_chrono::_M_R_T): Likewise.
271 2024-01-08  Jonathan Wakely  <jwakely@redhat.com>
273         * include/bits/unicode.h (__null_sentinel): Remove.
274         * testsuite/17_intro/names.cc: Add __null_sentinel.
276 2024-01-08  Jonathan Wakely  <jwakely@redhat.com>
278         * include/std/format (__format::_Runtime_format_string): Define
279         new class template.
280         (basic_format_string): Add non-consteval constructor for runtime
281         format strings.
282         (runtime_format): Define new function for C++26.
283         * testsuite/std/format/runtime_format.cc: New test.
285 2024-01-08  Jonathan Wakely  <jwakely@redhat.com>
287         * include/bits/chrono_io.h (__formatter_chrono): Always use
288         lvalue arguments to make_format_args.
289         * include/std/format (make_format_args): Change parameter pack
290         from forwarding references to lvalue references. Remove use of
291         remove_reference_t which is now unnecessary.
292         (format_to, formatted_size): Remove incorrect forwarding of
293         arguments.
294         * include/std/ostream (print): Remove forwarding of arguments.
295         * include/std/print (print): Likewise.
296         * testsuite/20_util/duration/io.cc: Use lvalues as arguments to
297         make_format_args.
298         * testsuite/std/format/arguments/args.cc: Likewise.
299         * testsuite/std/format/arguments/lwg3810.cc: Likewise.
300         * testsuite/std/format/functions/format.cc: Likewise.
301         * testsuite/std/format/functions/vformat_to.cc: Likewise.
302         * testsuite/std/format/string.cc: Likewise.
303         * testsuite/std/time/day/io.cc: Likewise.
304         * testsuite/std/time/month/io.cc: Likewise.
305         * testsuite/std/time/weekday/io.cc: Likewise.
306         * testsuite/std/time/year/io.cc: Likewise.
307         * testsuite/std/time/year_month_day/io.cc: Likewise.
308         * testsuite/std/format/arguments/args_neg.cc: New test.
310 2024-01-08  Jonathan Wakely  <jwakely@redhat.com>
312         * include/Makefile.am: Add new headers.
313         * include/Makefile.in: Regenerate.
314         * include/bits/unicode.h: New file.
315         * include/bits/unicode-data.h: New file.
316         * include/std/format: Include <bits/unicode.h>.
317         (__literal_encoding_is_utf8): Move to <bits/unicode.h>.
318         (_Spec::_M_fill): Change type to char32_t.
319         (_Spec::_M_parse_fill_and_align): Read a Unicode scalar value
320         instead of a single character.
321         (__write_padded): Change __fill_char parameter to char32_t and
322         encode it into the output.
323         (__formatter_str::format): Use new __unicode::__field_width and
324         __unicode::__truncate functions.
325         * include/std/ostream: Adjust namespace qualification for
326         __literal_encoding_is_utf8.
327         * include/std/print: Likewise.
328         * src/c++23/print.cc: Add [[unlikely]] attribute to error path.
329         * testsuite/ext/unicode/view.cc: New test.
330         * testsuite/std/format/functions/format.cc: Add missing examples
331         from the standard demonstrating alignment with non-ASCII
332         characters. Add examples checking correct handling of extended
333         grapheme clusters.
335 2024-01-08  Jonathan Wakely  <jwakely@redhat.com>
337         * include/bits/version.def (format_uchar): Define.
338         * include/bits/version.h: Regenerate.
339         * include/std/format (formatter<C, C>::format): Check for
340         _Pres_c and call _M_format_character directly. Cast C to its
341         unsigned equivalent for formatting as an integer.
342         (formatter<char, wchar_t>::format): Likewise.
343         (basic_format_arg(T&)): Store char arguments as unsigned char
344         for formatting to a wide string.
345         * testsuite/std/format/functions/format.cc: Adjust test. Check
346         formatting of
348 2024-01-07  Jonathan Wakely  <jwakely@redhat.com>
350         PR libstdc++/112997
351         * libsupc++/unwind-cxx.h (__cxa_call_terminate): Change first
352         parameter to void*.
354 2024-01-07  Jonathan Wakely  <jwakely@redhat.com>
356         * testsuite/20_util/variant/87619.cc: Remove dg-timeout-factor.
358 2024-01-07  Jonathan Wakely  <jwakely@redhat.com>
360         * include/std/type_traits (is_trivially_destructible_v): Use
361         built-in directly when concepts are supported.
362         * testsuite/20_util/is_trivially_destructible/value_v.cc: New
363         test.
365 2024-01-06  Gwenole Beauchesne  <gb.devel@gmail.com>
367         * testsuite/tr1/8_c_compatibility/cinttypes/functions.cc: Use
368         nonnull arguments to strtoimax() and wcstoimax() functions.
370 2024-01-05  Jonathan Wakely  <jwakely@redhat.com>
372         * src/c++17/fs_path.cc (path::_List::reserve): Limit maximum
373         size and check for overflows in arithmetic.
374         (path::operator/=(const path&)): Remove redundant exponential
375         growth calculation.
377 2024-01-05  Martin Küttler  <martin.kuettler@kernkonzept.com>
379         * src/c++17/fs_path.cc (path::_List::reserve): Avoid
380         floating-point arithmetic.
382 2024-01-05  Jonathan Wakely  <jwakely@redhat.com>
384         PR libstdc++/113241
385         * include/std/type_traits (is_convertible_v): Guard use of
386         built-in with preprocessor check.
388 2024-01-05  Jonathan Wakely  <jwakely@redhat.com>
390         PR libstdc++/113200
391         * include/bits/char_traits.h (__gnu_cxx::char_traits::move): Use
392         __builtin_constant_p to check for unrelated pointers that cannot
393         be compared during constant evaluation.
394         * testsuite/21_strings/char_traits/requirements/113200.cc: New
395         test.
397 2024-01-05  Cassio Neri  <cassio.neri@gmail.com>
399         * include/std/chrono: Fix + and - for months and weekdays.
400         * testsuite/std/time/month/1.cc: Add constexpr tests against overflow.
401         * testsuite/std/time/month/2.cc: New test for extreme values.
402         * testsuite/std/time/weekday/1.cc: Add constexpr tests against overflow.
403         * testsuite/std/time/weekday/2.cc: New test for extreme values.
405 2024-01-05  Jonathan Wakely  <jwakely@redhat.com>
407         PR libstdc++/113099
408         * include/bits/locale_classes.tcc (__try_use_facet): Use
409         if-constexpr for C++11 and up.
411 2024-01-05  Ken Matsui  <kmatsui@gcc.gnu.org>
413         * include/std/type_traits: Use _GLIBCXX_USE_BUILTIN_TRAIT.
415 2024-01-04  Arsen Arsenović  <arsen@aarsen.me>
417         * include/std/generator (_Subyield_state::_M_jump_in): Fix typo
418         reported by Will Hawkins <hawkinsw@obs.cr>.
420 2024-01-04  Arsen Arsenović  <arsen@aarsen.me>
422         * include/std/generator (_Stateless_alloc): Rename typename _A
423         to _All.
425 2024-01-03  Patrick Palka  <ppalka@redhat.com>
427         PR testsuite/113175
428         * testsuite/std/ranges/iota/max_size_type.cc (test02): Reduce
429         'limit' to 100 from 1000 and adjust 'log2_limit' accordingly.
430         (test03): Likewise.
433 Copyright (C) 2024 Free Software Foundation, Inc.
435 Copying and distribution of this file, with or without modification,
436 are permitted in any medium without royalty provided the copyright
437 notice and this notice are preserved.