Re: [PATCH][_GLIBCXX_INLINE_VERSION] Fix

2023-09-20 Thread Jonathan Wakely
On Wed, 20 Sept 2023 at 05:51, François Dumont via Libstdc++ wrote: > > libstdc++: Remove std::constract_violation from versioned namespace Spelling mistake in contract_violation, and it's not std::contract_violation, it's std::experimental::contract_violation > > GCC expects this type to be in

[committed] libstdc++: Minor tweak to C++20 status docs

2023-09-18 Thread Jonathan Wakely via Gcc-patches
Pushed to trunk. -- >8 -- The row for P1466R3 was missing the info on when it was implemented. libstdc++-v3/ChangeLog: * doc/xml/manual/status_cxx2020.xml: Tweak P1466R3 status. * doc/html/manual/status.html: Regenerate. --- libstdc++-v3/doc/html/manual/status.html | 2

[committed] libstdc++: Update C++20 and C++23 status docs

2023-09-18 Thread Jonathan Wakely via Gcc-patches
Pushed to trunk. Most of this should be backported to gcc-13 too. We also need a C++26 status page, which doesn't exist yet. -- 8 -- libstdc++-v3/ChangeLog: * doc/xml/manual/configure.xml: Use conventional option name. * doc/xml/manual/status_cxx2020.xml: Update. *

[wwwdocs] Document libstdc++ changes in GCC 14

2023-09-18 Thread Jonathan Wakely via Gcc-patches
Pushed to wwwdocs. --- htdocs/gcc-14/changes.html | 48 +- 1 file changed, 47 insertions(+), 1 deletion(-) diff --git a/htdocs/gcc-14/changes.html b/htdocs/gcc-14/changes.html index eae25f1a..65382746 100644 --- a/htdocs/gcc-14/changes.html +++

[committed] libstdc++: Minor update to installation docs

2023-09-18 Thread Jonathan Wakely via Gcc-patches
Pushed to trunk. -- >8 -- libstdc++-v3/ChangeLog: * doc/xml/manual/intro.xml: Clarify that building libstdc++ separately from GCC is not supported. * doc/xml/manual/prerequisites.xml: Note msgfmt prerequisite for testing. * doc/html/manual/setup.html:

[committed 08/11] libstdc++: Remove dg-options "-std=gnu++20" from 27_io tests

2023-09-15 Thread Jonathan Wakely via Gcc-patches
Tested aarch64-linux. Pushed to trunk. -- >8 -- The testsuite will automatically select C++20 for these tests now, and removing the hardcoded -std option allows them to be tested for C++23 and C++26 as well. libstdc++-v3/ChangeLog: *

[committed 11/11] libstdc++: Do not require effective target pthread for some tests

2023-09-15 Thread Jonathan Wakely via Gcc-patches
Tested aarch64-linux. Pushed to trunk. -- >8 -- We can remove { dg-require-effective-target pthread } and allow these tests non-pthread targets and conditionally adding -pthread only for pthread targets. Also remove the { dg-options "-std=gnu++20" } that is no longer needed.

[committed 10/11] libstdc++: Remove dg-options "-std=gnu++20" from remaining tests

2023-09-15 Thread Jonathan Wakely via Gcc-patches
Tested aarch64-linux. Pushed to trunk. -- >8 -- The testsuite will automatically select C++20 for these tests now, and removing the hardcoded -std option allows them to be tested for C++23 and C++26 as well. libstdc++-v3/ChangeLog: * testsuite/18_support/coroutines/95917.cc: Remove

[committed 05/11] libstdc++: Remove dg-options "-std=gnu++20" from 23_containers tests

2023-09-15 Thread Jonathan Wakely via Gcc-patches
Tested aarch64-linux. Pushed to trunk. -- >8 -- The testsuite will automatically select C++20 for these tests now, and removing the hardcoded -std option allows them to be tested for C++23 and C++26 as well. libstdc++-v3/ChangeLog: *

[committed 07/11] libstdc++: Remove dg-options "-std=gnu++20" from 26_numerics tests

2023-09-15 Thread Jonathan Wakely via Gcc-patches
Tested aarch64-linux. Pushed to trunk. -- >8 -- The testsuite will automatically select C++20 for these tests now, and removing the hardcoded -std option allows them to be tested for C++23 and C++26 as well. libstdc++-v3/ChangeLog: * testsuite/26_numerics/accumulate/constexpr.cc:

[committed 09/11] libstdc++: Remove dg-options "-std=gnu++20" from 30_threads tests

2023-09-15 Thread Jonathan Wakely via Gcc-patches
Tested aarch64-linux. Pushed to trunk. -- >8 -- The testsuite will automatically select C++20 for these tests now, and removing the hardcoded -std option allows them to be tested for C++23 and C++26 as well. libstdc++-v3/ChangeLog: * testsuite/30_threads/barrier/1.cc: Remove dg-options

[committed 04/11] libstdc++: Remove dg-options "-std=gnu++20" from 21_strings tests

2023-09-15 Thread Jonathan Wakely via Gcc-patches
Tested aarch64-linux. Pushed to trunk. -- >8 -- The testsuite will automatically select C++20 for these tests now, and removing the hardcoded -std option allows them to be tested for C++23 and C++26 as well. libstdc++-v3/ChangeLog: *

[committed 06/11] libstdc++: Remove dg-options "-std=gnu++20" from 24_iterators tests

2023-09-15 Thread Jonathan Wakely via Gcc-patches
Tested aarch64-linux. Pushed to trunk. -- >8 -- The testsuite will automatically select C++20 for these tests now, and removing the hardcoded -std option allows them to be tested for C++23 and C++26 as well. libstdc++-v3/ChangeLog: * testsuite/24_iterators/aliases.cc: Remove dg-options

[committed 01/11] libstdc++: Remove dg-options "-std=gnu++20" from tests

2023-09-15 Thread Jonathan Wakely via Gcc-patches
Tested aarch64-linux. Pushed to trunk. -- >8 -- The testsuite will automatically select C++20 for these tests now, and removing the hardcoded -std option allows them to be tested for C++23 and C++26 as well. libstdc++-v3/ChangeLog: *

[committed 03/11] libstdc++: Remove dg-options "-std=gnu++20" from 20_utils tests

2023-09-15 Thread Jonathan Wakely via Gcc-patches
Tested aarch64-linux. Pushed to trunk. -- >8 -- The testsuite will automatically select C++20 for these tests now, and removing the hardcoded -std option allows them to be tested for C++23 and C++26 as well. libstdc++-v3/ChangeLog: * testsuite/20_util/allocator/105975.cc: Remove

[committed 02/11] libstdc++: Remove dg-options "-std=gnu++20" from tests

2023-09-15 Thread Jonathan Wakely via Gcc-patches
Tested aarch64-linux. Pushed to trunk. -- >8 -- The testsuite will automatically select C++20 for these tests now, and removing the hardcoded -std option allows them to be tested for C++23 and C++26 as well. libstdc++-v3/ChangeLog: *

[committed] libstdc++: Add missing tests for std::basic_filebuf::native_handle()

2023-09-15 Thread Jonathan Wakely via Gcc-patches
Tested aarch64-linux. Pushed to trunk. -- >8 -- I forgot to 'git add' these files in the commit that added the new member function to basic_filebuf. libstdc++-v3/ChangeLog: * testsuite/27_io/basic_filebuf/native_handle/char/1.cc: New test. *

[committed] libstdc++: Implement C++26 native handles for file streams (P1759R6)

2023-09-15 Thread Jonathan Wakely via Gcc-patches
Tested aarch64-linux. Pushed to trunk. -- >8 -- The new __basic_file::native_handle() function can be added for C++11 and above, because the names "native_handle" and "native_handle_type" are already reserved since C++11. Exporting those symbols from the shared library does no harm, even if the

[committed] libstdc++: Add log line to testsuite output

2023-09-15 Thread Jonathan Wakely via Gcc-patches
Tested aarch64-linux. Pushed to trunk. This makes it easier to debug the problem when a test isn't running because there's a testsuite_files that doesn't include it. -- >8 -- Write a line to the log when using a testsuite_files file. libstdc++-v3/ChangeLog: *

Re: [PATCH 00/13] libstdc++: Add support for running tests with multiple -std options

2023-09-15 Thread Jonathan Wakely via Gcc-patches
On Mon, 11 Sept 2023 at 17:37, Jonathan Wakely via Libstdc++ wrote: > > This patch series replicates the behaviour of the g++ testsuite, so that > libstdc++ tests can easily be run for multiple different -std options in > a single testsuite run. As described in the updated do

[committed] libstdc++: Fix 29_atomics/headers/atomic/types_std_c++2a_neg.cc for C++23

2023-09-15 Thread Jonathan Wakely via Gcc-patches
Tested aarch64-linux. Pushed to trunk. -- >8 -- This test fails when run as C++23 because the PCH includes which declares ::memory_order, invalidating the test's assumptions. Disable PCH so that the test verifies that doesn't declare ::memory_order, as originally intended. Also fix the

[PATCH v2 6/13] libstdc++: Remove dg-options "-std=gnu++20" from and tests

2023-09-15 Thread Jonathan Wakely via Gcc-patches
This is v2 of patch 6/13, because I missed three files in the first patch. Tested aarch64-linux. I intend to push this (and the rest of the series) soon. -- >8 -- The testsuite will automatically select C++20 for these tests now, and removing the hardcoded -std option allows them to be tested

Re: [PATCH] libstdc++: Reduce integer std::to/from_chars symbol sizes

2023-09-15 Thread Jonathan Wakely via Gcc-patches
On Wed, 13 Sept 2023 at 23:52, Patrick Palka via Libstdc++ wrote: > > Tested on x86_64-pc-linux-gnu, does this look OK for trunk? OK, thanks. > > -- >8 -- > > For std::to_chars: > > The constrained alias __integer_to_chars_result_type seems unnecessary > ever since r10-3080-g28f0075742ed58 got

[committed] libstdc++: Fix constraints for std::variant default constructor

2023-09-15 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux. Pushed to trunk. Thanks to Nina Ranns for noticing this bug. Removing the base class isn't an ABI change. It's an empty base class with a type that's unique to the std::variant that derives from it, so doesn't change whether two std::variant subobjects can be overlapping.

[committed] libstdc++: Remove non-void static assertions in variant's std::get [PR111172]

2023-09-15 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux. Pushed to trunk. This would be safe to backport and slightly improve compile times. -- >8 -- A void template argument would cause a substitution failure when trying to form a reference for the return type, so the function body would never be instantiated.

[committed] libstdc++: Add operator bool to result types (P2497R0)

2023-09-15 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux. Pushed to trunk. This was supposed to be in C++23, but I messed up the polls at the last meeting for C++23 ballot resolution. I've heard suggestions that we should just backport it to C++23 as a nice quality of life improvement, but I've also heard objections to any such

Re: [PATCH] libstdc++: Use C++20 constraints in

2023-09-14 Thread Jonathan Wakely via Gcc-patches
On Thu, 14 Sept 2023 at 15:13, Patrick Palka via Libstdc++ wrote: > > Tested on x86_64-pc-linux-gnu, does this look OK for trunk? > > -- >8 -- > > By now it's probably safe to assume supported compilers have full > concepts support in C++20 mode. Clang 14.0.0 is good enough for these uses. It

[committed] libstdc++: Add testcase for std::make_integer_sequence bug [PR111357]

2023-09-14 Thread Jonathan Wakely via Gcc-patches
Tested aarch64-linux. Pushed to trunk. I'll backport the test and a library workaround to the release branches. -- >8 -- The compiler bug has been fixed on trunk, but this adds a regression test for the library component. libstdc++-v3/ChangeLog: PR c++/111357 *

[committed] libstdc++: Support dg-additional-files in tests

2023-09-14 Thread Jonathan Wakely via Gcc-patches
Tested aarch64-linux. Pushed to trunk. The text files that these tests use are all identical. Now that each test starts with a fresh copy of the file it needs, there's no reason to have different files for each test, so we could remove the duplicates and change the tests to use the same file

[committed] libstdc++: Remove some more unconditional uses of atomics

2023-09-14 Thread Jonathan Wakely via Gcc-patches
Tested aarch64-linux. Pushed to trunk. -- >8 -- These atomics cause linker errors on arm4t where __sync_synchronize is not defined. For single-threaded targets we don't need the atomics. libstdc++-v3/ChangeLog: * include/experimental/io_context (io_context) [!_GLIBCXX_HAS_GTHREADS]:

Re: [PATCH v2 2/2] libstdc++: Add dg-require-thread-fence in several tests

2023-09-14 Thread Jonathan Wakely via Gcc-patches
On Thu, 14 Sept 2023 at 10:10, Christophe Lyon wrote: > > Some targets like arm-eabi with newlib and default settings rely on > __sync_synchronize() to ensure synchronization. Newlib does not > implement it by default, to make users aware they have to take special > care. > > This makes a few

Re: [PATCH] libstdc++: Remove some more unconditional uses of atomics

2023-09-14 Thread Jonathan Wakely via Gcc-patches
On Thu, 14 Sept 2023 at 09:41, Christophe Lyon wrote: > > > > On Thu, 14 Sept 2023 at 10:17, Jonathan Wakely wrote: >> >> On Thu, 14 Sept 2023 at 08:44, Christophe Lyon >> wrote: >> > >> > Hi, >> > >> > >> > On Wed, 13

Re: [PATCH] libstdc++: Remove some more unconditional uses of atomics

2023-09-14 Thread Jonathan Wakely via Gcc-patches
On Thu, 14 Sept 2023 at 08:44, Christophe Lyon wrote: > > Hi, > > > On Wed, 13 Sept 2023 at 14:32, Jonathan Wakely wrote: >> >> Tested x86_64-linux and aarch64-linux. I intend to push this to trunk. >> >> -- >8 -- >> >> These atomics

Re: [PATCH][_GLIBCXX_INLINE_VERSION] Fix friend declarations

2023-09-13 Thread Jonathan Wakely via Gcc-patches
On Wed, 13 Sept 2023 at 21:47, François Dumont wrote: > > It's working and what's I've committed. Nice, thanks! > > Thanks > > On 12/09/2023 19:04, Jonathan Wakely wrote: > > On Tue, 12 Sept 2023 at 17:47, Jonathan Wakely wrote: > >> On Wed, 23 Aug 2023 at 1

Re: [PATCH 2/2] libstdc++: Add dg-require-thread-fence in several tests

2023-09-13 Thread Jonathan Wakely via Gcc-patches
On Wed, 13 Sept 2023 at 16:38, Christophe Lyon via Libstdc++ wrote: > > On Tue, 12 Sept 2023 at 11:07, Jonathan Wakely wrote: > > > On Tue, 12 Sept 2023 at 08:59, Christophe Lyon > > wrote: > > > I've noticed several undefined references to > >

[PATCH] libstdc++: Remove some more unconditional uses of atomics

2023-09-13 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux and aarch64-linux. I intend to push this to trunk. -- >8 -- These atomics cause linker errors on arm4t where __sync_synchronize is not defined. For single-threaded targets we don't need the atomics. libstdc++-v3/ChangeLog: * include/experimental/io_context

Re: [PATCH][_GLIBCXX_INLINE_VERSION] Fix friend declarations

2023-09-12 Thread Jonathan Wakely via Gcc-patches
On Tue, 12 Sept 2023 at 17:47, Jonathan Wakely wrote: > > On Wed, 23 Aug 2023 at 18:35, François Dumont via Libstdc++ > wrote: > > > > Hi > > > > The few tests that are failing in versioned namespace mode are due to > > those friend declarations. &

Re: [PATCH][_GLIBCXX_INLINE_VERSION] Fix friend declarations

2023-09-12 Thread Jonathan Wakely via Gcc-patches
On Wed, 23 Aug 2023 at 18:35, François Dumont via Libstdc++ wrote: > > Hi > > The few tests that are failing in versioned namespace mode are due to > those friend declarations. > > This is a fix proposal even if I considered 2 other options: > > 1. Make __format::_Arg_store a struct and so do not

Re: [PATCH] [11/12/13/14 Regression] ABI break in _Hash_node_value_base since GCC 11 [PR 111050]

2023-09-12 Thread Jonathan Wakely via Gcc-patches
On Mon, 11 Sept 2023 at 18:19, François Dumont wrote: > > > On 11/09/2023 13:51, Jonathan Wakely wrote: > > On Sun, 10 Sept 2023 at 14:57, François Dumont via Libstdc++ > > wrote: > >> Following confirmation of the fix by TC here is the patch where I'm > >>

[PATCH 14/13] libstdc++: Re-initialize static data files used by tests

2023-09-12 Thread Jonathan Wakely via Gcc-patches
This fixes the problem observed with some filebuf tests. The "@require@" string seems a bit hacky, as I don't know why that string is in the tests in the first palce ... but it is there, so this works. -- > 8-- Some tests rely on text files with specific content being present in the test

Re: [PATCH 3/3] libstdc++: Fix std::not_fn perfect forwarding [PR111327]

2023-09-12 Thread Jonathan Wakely via Gcc-patches
On Tue, 12 Sept 2023 at 02:11, Patrick Palka via Libstdc++ wrote: > > The previous patch fixed perfect forwarding for std::bind_front. > This patch fixes the same issue for std::not_fn. > > Tested on x86_64-pc-linux-gnu, does this look OK for trunk and > perhaps 13? Yes for both, thanks. > >

Re: [PATCH 2/3] libstdc++: Fix std::bind_front perfect forwarding [PR111327]

2023-09-12 Thread Jonathan Wakely via Gcc-patches
On Tue, 12 Sept 2023 at 02:09, Patrick Palka via Libstdc++ wrote: > > In order to properly implement a perfect forwarding call wrapper > (before 'deducing this' at least) we need a total of 8 operator() > overloads, 4 main ones and 4 deleted ones for each const/ref qual pair, > as described in

Re: [PATCH 1/3] libstdc++: Remove std::bind_front specialization for no bound args

2023-09-12 Thread Jonathan Wakely via Gcc-patches
On Tue, 12 Sept 2023 at 13:46, Patrick Palka via Libstdc++ wrote: > > On Mon, 11 Sep 2023, Patrick Palka wrote: > > > This specialization for the case of no bound args, added by > > r13-4214-gcbd05ca5ab1231, seems to be mostly obsoleted by > > r13-5033-ge2eab3c4edb6aa which added

Re: [PATCH 00/13] libstdc++: Add support for running tests with multiple -std options

2023-09-12 Thread Jonathan Wakely via Gcc-patches
On Mon, 11 Sept 2023 at 17:37, Jonathan Wakely via Libstdc++ wrote: > > This patch series replicates the behaviour of the g++ testsuite, so that > libstdc++ tests can easily be run for multiple different -std options in > a single testsuite run. As described in the updated do

[committed] contrib: Quote variable in test expression [PR111360]

2023-09-12 Thread Jonathan Wakely via Gcc-patches
Committed as obvious. -- >8 -- Without the quotes some shells will always return true and some will print an error. It should be quoted so that a null variable works as intended. contrib/ChangeLog: PR other/111360 * gcc_update: Quote variable. --- contrib/gcc_update | 2 +- 1

[committed] libstdc++: Format Python code according to PEP8

2023-09-12 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux. Pushed to trunk. -- >8 -- These files were filtered through autopep8 to reformat them more conventionally. libstdc++-v3/ChangeLog: * python/libstdcxx/v6/printers.py: Reformat. * python/libstdcxx/v6/xmethods.py: Likewise. ---

Re: [PATCH 2/2] libstdc++: Add dg-require-thread-fence in several tests

2023-09-12 Thread Jonathan Wakely via Gcc-patches
On Tue, 12 Sept 2023 at 08:59, Christophe Lyon wrote: > > > > On Mon, 11 Sept 2023 at 18:11, Jonathan Wakely wrote: >> >> On Mon, 11 Sept 2023 at 16:40, Christophe Lyon >> wrote: >> > >> > >> > >> > On Mon, 11 Sept 2023 at 17:22,

Re: [PATCH 2/2] libstdc++: Optimize is_scoped_enum trait performance

2023-09-12 Thread Jonathan Wakely via Gcc-patches
On Tue, 12 Sept 2023, 01:21 Ken Matsui via Libstdc++, wrote: > This patch optimizes the performance of the is_scoped_enum trait > by dispatching to the new __is_scoped_enum built-in trait. > OK for trunk (after the built-in is in the front end), thanks. > libstdc++-v3/ChangeLog: > >

[PATCH 11/13] libstdc++: Remove dg-options "-std=gnu++23" from remaining tests

2023-09-11 Thread Jonathan Wakely via Gcc-patches
The testsuite will automatically select C++23 for these tests now, and removing the hardcoded -std option allows them to be tested for C++26 as well. libstdc++-v3/ChangeLog: * testsuite/18_support/headers/limits/synopsis_cxx23.cc: Remove dg-options. *

[PATCH 10/13] libstdc++: Remove dg-options "-std=gnu++23" from std::expected tests

2023-09-11 Thread Jonathan Wakely via Gcc-patches
The testsuite will automatically select C++23 for these tests now, and removing the hardcoded -std option allows them to be tested for C++26 as well. libstdc++-v3/ChangeLog: * testsuite/20_util/expected/assign.cc: Remove dg-options. * testsuite/20_util/expected/bad.cc: Likewise.

[PATCH 08/13] libstdc++: Remove dg-options "-std=gnu++20" from std::format tests

2023-09-11 Thread Jonathan Wakely via Gcc-patches
The testsuite will automatically select C++20 for these tests now, and removing the hardcoded -std option allows them to be tested for C++23 and C++26 as well. libstdc++-v3/ChangeLog: * testsuite/std/format/arguments/args.cc: Remove dg-options. *

[PATCH 05/13] libstdc++: Remove dg-options "-std=c++20" from and tests

2023-09-11 Thread Jonathan Wakely via Gcc-patches
The testsuite will automatically select C++20 for these tests now, and removing the hardcoded -std option allows them to be tested for C++23 and C++26 as well. There doesn't seem to be any reason they need to use strict -std=c++20 mode, so don't add the { dg-add-options strict_std } directive,

[PATCH 12/13] libstdc++: Remove dg-options "-std=gnu++2a" from XFAIL std::span tests

2023-09-11 Thread Jonathan Wakely via Gcc-patches
The testsuite will automatically select C++20 for these tests now, and removing the hardcoded -std option allows them to be tested for C++23 and C++26 as well. We can also combine the { dg-require-effective-target c++2a } directive with the dg-do selector. We need to add the no_pch options for

[PATCH 09/13] libstdc++: Remove dg-options "-std=gnu++20" from std::chrono tests

2023-09-11 Thread Jonathan Wakely via Gcc-patches
The testsuite will automatically select C++20 for these tests now, and removing the hardcoded -std option allows them to be tested for C++23 and C++26 as well. libstdc++-v3/ChangeLog: * testsuite/20_util/duration/arithmetic/overflow_c++20.cc: Remove dg-options. *

[PATCH 02/13] libstdc++: Replace dg-options "-std=c++11" with dg-add-options strict_std

2023-09-11 Thread Jonathan Wakely via Gcc-patches
These tests can (and should) also be run for later standards, so replace the { dg-options "-std=c++11" } with { dg-add-options strict_std } and a target selector for c++11. libstdc++-v3/ChangeLog: * testsuite/23_containers/deque/48101-2_neg.cc: Replace dg-options with target

[PATCH 07/13] libstdc++: Remove dg-options "-std=gnu++2a" from constrained algo tests

2023-09-11 Thread Jonathan Wakely via Gcc-patches
The testsuite will automatically select C++20 for these tests now, and removing the hardcoded -std option allows them to be tested for C++23 and C++26 as well. libstdc++-v3/ChangeLog: * testsuite/20_util/function_objects/range.cmp/equal_to.cc: Remove dg-options. *

[PATCH 04/13] libstdc++: Replace dg-options "-std=c++20" with dg-add-options strict_std

2023-09-11 Thread Jonathan Wakely via Gcc-patches
The testsuite will automatically select C++20 for these tests now, and removing the hardcoded -std option allows them to be tested for C++23 and C++26 as well. Because they test a problem seen with -std=c++20 add the new { dg-add-options strict_std } directive so that the test runner uses

[PATCH 13/13] libstdc++: Simplify dejagnu directives for some tests using threads

2023-09-11 Thread Jonathan Wakely via Gcc-patches
Replace dg-require-effective-target directives with a target selector on the dg-do directive. We can also remove { dg-require-effective-target pthread } and the associated { dg-options "-pthread" } by allowing it to run on non-pthread targets and conditionally adding -pthread only for pthread

[PATCH 06/13] libstdc++: Remove dg-options "-std=gnu++20" from and tests

2023-09-11 Thread Jonathan Wakely via Gcc-patches
The testsuite will automatically select C++20 for these tests now, and removing the hardcoded -std option allows them to be tested for C++23 and C++26 as well. libstdc++-v3/ChangeLog: * testsuite/std/concepts/1.cc: Remove dg-options. * testsuite/std/concepts/2.cc: Likewise.

[PATCH 03/13] libstdc++: Replace dg-options "-std=c++17" with dg-add-options strict_std

2023-09-11 Thread Jonathan Wakely via Gcc-patches
These tests can (and should) also be run for later standards, so replace the { dg-options "-std=c++17" } with { dg-add-options strict_std }. * testsuite/tr1/5_numerical_facilities/special_functions/07_conf_hyperg/compile_cxx17.cc: Replace dg-options -std=c++17 with dg-add-options

[PATCH 00/13] libstdc++: Add support for running tests with multiple -std options

2023-09-11 Thread Jonathan Wakely via Gcc-patches
ild of GCC is functional, without running the entire libstdc++ testsuite. Any comments or suggestions? -- >8 -- Jonathan Wakely (13): libstdc++: Add support for running tests with multiple -std options libstdc++: Replace dg-options "-std=c++11" with dg-add-options strict_std libstd

[PATCH 01/13] libstdc++: Add support for running tests with multiple -std options

2023-09-11 Thread Jonathan Wakely via Gcc-patches
This copies the code from the compiler's gcc/testsuite/lib/g++-dg.exp so that each test can be run multiple times, with different -std options. This means that we can remove most { dg-options "-std=gnu++20" } directives from tests, because the testsuite will automatically select a set of -std

Re: [PATCH 2/2] libstdc++: Add dg-require-thread-fence in several tests

2023-09-11 Thread Jonathan Wakely via Gcc-patches
On Mon, 11 Sept 2023 at 16:40, Christophe Lyon wrote: > > > > On Mon, 11 Sept 2023 at 17:22, Jonathan Wakely wrote: >> >> On Mon, 11 Sept 2023 at 14:57, Christophe Lyon >> wrote: >> > >> > >> > >> > On Mon, 11 Sept 2023 at 15:12,

[committed] libstdc++: Remove unconditional use of atomics in Debug Mode

2023-09-11 Thread Jonathan Wakely via Gcc-patches
Tested aarch64-linux. Pushed to trunk. Probably worth backporting too. -- >8 -- The fix for PR 91910 (r10-3426-gf7a3a382279585) introduced unconditional uses of atomics into src/c++11/debug.cc, which causes linker errors for arm4t where GCC emits an unresolved reference to __sync_synchronize.

[committed] libstdc++: Move __glibcxx_assert_fail to its own file

2023-09-11 Thread Jonathan Wakely via Gcc-patches
Tested aarch64-linux. Pushed to trunk. Maybe worth backporting too. -- >8 -- This avoids a dependency on the other symbols in src/c++11/debug.o when linking statically to libstdc++.a without using -Wl,--gc-sections. libstdc++-v3/ChangeLog: * src/c++11/Makefile.am: Add new file.

Re: [PATCH 2/2] libstdc++: Add dg-require-thread-fence in several tests

2023-09-11 Thread Jonathan Wakely via Gcc-patches
On Mon, 11 Sept 2023 at 14:57, Christophe Lyon wrote: > > > > On Mon, 11 Sept 2023 at 15:12, Jonathan Wakely wrote: >> >> On Mon, 11 Sept 2023 at 13:36, Christophe Lyon >> wrote: >> > >> > >> > >> > On Mon, 11 Sept 2023 at 12:59,

Re: [PATCH v2] libstdc++: Define _GLIBCXX_HAS_BUILTIN_TRAIT

2023-09-11 Thread Jonathan Wakely via Gcc-patches
On Thu, 31 Aug 2023 at 13:33, Ken Matsui wrote: > > On Tue, Aug 8, 2023 at 1:23 PM Jonathan Wakely wrote: > > > > > > > > On Wed, 19 Jul 2023 at 20:33, Ken Matsui via Libstdc++ > > wrote: > >> > >> This patch defines _GLIBCXX_HAS_BUILTIN_TR

[committed] libstdc++: Formatting std::thread::id and std::stacktrace (P2693R1)

2023-09-11 Thread Jonathan Wakely via Gcc-patches
Tested aarch64-linux. Pushed to trunk. -- >8 -- New std::formatter specializations for C++23. libstdc++-v3/ChangeLog: * include/bits/version.def (__cpp_lib_formatters): Define. * include/bits/version.h: Regenerate. * include/std/stacktrace (formatter)

Re: [PATCH 2/2] libstdc++: Add dg-require-thread-fence in several tests

2023-09-11 Thread Jonathan Wakely via Gcc-patches
On Mon, 11 Sept 2023 at 13:36, Christophe Lyon wrote: > > > > On Mon, 11 Sept 2023 at 12:59, Jonathan Wakely wrote: >> >> On Sun, 10 Sept 2023 at 20:31, Christophe Lyon >> wrote: >> > >> > Some targets like arm-eabi with newlib and default sett

Re: [PATCH] [11/12/13/14 Regression] ABI break in _Hash_node_value_base since GCC 11 [PR 111050]

2023-09-11 Thread Jonathan Wakely via Gcc-patches
On Sun, 10 Sept 2023 at 14:57, François Dumont via Libstdc++ wrote: > > Following confirmation of the fix by TC here is the patch where I'm > simply adding a 'constexpr' on _M_next(). > > Please let me know this ChangeLog entry is correct. I would prefer this > patch to be assigned to 'TC' with

[PATCH] libstdc++: Check if getent is available in git config script [PR111359]

2023-09-11 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux, powerpc-aix, and minimally tested on macOS 12.6 (darwin 21.6.0). OK for trunk? -- >8 -- contrib/ChangeLog: PR other/111359 * gcc-git-customization.sh: Check for getent before using it. Use id on macOS. --- contrib/gcc-git-customization.sh | 6

Re: [PATCH 2/2] libstdc++: Add dg-require-thread-fence in several tests

2023-09-11 Thread Jonathan Wakely via Gcc-patches
On Sun, 10 Sept 2023 at 20:31, Christophe Lyon wrote: > > Some targets like arm-eabi with newlib and default settings rely on > __sync_synchronize() to ensure synchronization. Newlib does not > implement it by default, to make users aware they have to take special > care. > > This makes a few

Re: [committed] libstdc++: Add Filesystem TS and std::stacktrace symbols to libstdc++exp.a

2023-09-08 Thread Jonathan Wakely via Gcc-patches
I forgot to say: Tested x86_64-linux and aarch64-linux, built for avr, arm-eabi and cris-elf. Pushed to trunk. On Fri, 8 Sept 2023 at 18:09, Jonathan Wakely via Libstdc++ wrote: > > This consolidates the three static archives for extensions into one, so > that -lstdc++exp ca

[committed] libstdc++: Update outdated default -std in testing docs

2023-09-08 Thread Jonathan Wakely via Gcc-patches
Pushed to gcc-13 (I've removed/rewritten this text on trunk). I'll push to the older branches too. -- >8 -- libstdc++-v3/ChangeLog: * doc/xml/manual/test.xml: Update reference to -std=gnu++14 as the default. * doc/html/manual/test.html: Regenerate. ---

Re: [PATCH v2] libstdc++: Fix -Wunused-parameter warnings

2023-09-08 Thread Jonathan Wakely via Gcc-patches
On Thu, 7 Sept 2023 at 20:30, Pekka Seppänen wrote: > > On 7.9.2023 19:40, Jonathan Wakely wrote: > > On 29/08/23 15:04 +0300, Pekka Seppänen wrote: > >> libstdc++: Fix -Wunused-parameter warnings when _GLIBCXX_USE_WCHAR_T is > >> not defined. > >> > >

[committed] libstdc++: Add Filesystem TS and std::stacktrace symbols to libstdc++exp.a

2023-09-08 Thread Jonathan Wakely via Gcc-patches
This consolidates the three static archives for extensions into one, so that -lstdc++exp can be used to provide the definitions of all unstable library features. The libstdc++_libbacktrace.a archive is now just a "noinst" convenience library that is only used during the build, not installed. Its

Re: [PATCH] libstdc++: Reduce output of 'make check'

2023-09-08 Thread Jonathan Wakely via Gcc-patches
On Thu, 7 Sept 2023 at 14:32, Jonathan Wakely via Libstdc++ wrote: > > Any objections to this change? Pushed to trunk now. > > -- >8 -- > > This removes the 39 lines of shell commands that get echoed when > starting the testsuite. The fact that near the end of that

Re: [PATCH] libbacktrace: Fix unconditional -Werror

2023-09-08 Thread Jonathan Wakely via Gcc-patches
On Fri, 8 Sept 2023 at 11:10, Jonathan Wakely wrote: > > The patch looks good, thanks. I noticed the unconditional -Werror the other > day when testing a build on avr. > > N.B. All patches should go to gcc-patches (as well as a more specific list > like libstdc++ when ap

Re: [PATCH] libstdc++: Reduce output of 'make check'

2023-09-08 Thread Jonathan Wakely via Gcc-patches
On Fri, 8 Sept 2023 at 13:15, Eric Gallager wrote: > > On Fri, Sep 8, 2023 at 6:32 AM Jonathan Wakely wrote: > > > > On Fri, 8 Sept 2023 at 03:16, Eric Gallager wrote: > > > > > > Maybe use $(AM_V_at) instead? That would allow it to be controlled by

Re: [PATCH] libstdc++: Reduce output of 'make check'

2023-09-08 Thread Jonathan Wakely via Gcc-patches
is x86_64-pc-linux-gnu === libstdc++ tests === Everything from the AR= line to the echo "WARNING" line and the "fi" after it would be suppressed with this patch. I don't think making it configurable (and default to still being printed) is useful. > &

Re: [PATCH] libbacktrace: Fix unconditional -Werror

2023-09-08 Thread Jonathan Wakely via Gcc-patches
The patch looks good, thanks. I noticed the unconditional -Werror the other day when testing a build on avr. N.B. All patches should go to gcc-patches (as well as a more specific list like libstdc++ when appropriate). OK for trunk On Fri, 8 Sept 2023, 10:49 Alexey Lapshin via Libstdc++, <

Re: [PATCH 0/2] libstdc++: Documentation fixes.

2023-09-07 Thread Jonathan Wakely via Gcc-patches
On Mon, 21 Aug 2023 at 21:40, Jonathan Wakely wrote: > > > > On Mon, 21 Aug 2023, 21:33 Bruno Victal, wrote: >> >> This small patch-series fixes the 'doc-install-info' rule >> and updates the URI used for docbook-xsl. > > > Thanks! I'll get these committed

[committed] libstdc++: Simplify dejagnu target selector

2023-09-07 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux. Pushed to trunk. -- >8 -- A target selector allows multiple target triplets, it's not necessary to use the || operator in a logical expression. libstdc++-v3/ChangeLog: * testsuite/27_io/filesystem/path/concat/94063.cc: Simplify dg-do target selector. ---

[committed] libstdc++: Remove trailing whitespace from dejagnu files

2023-09-07 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux. Pushed to trunk. -- >8 -- Also fix the name of a source file used by an effective target check. libstdc++-v3/ChangeLog: * testsuite/config/default.exp: Remove trailing whitespace. * testsuite/lib/dg-options.exp: Likewise. * testsuite/lib/prune.exp:

Re: [PATCH] libstdc++: Fix -Wunused-parameter warnings

2023-09-07 Thread Jonathan Wakely via Gcc-patches
On 29/08/23 15:04 +0300, Pekka Seppänen wrote: libstdc++: Fix -Wunused-parameter warnings when _GLIBCXX_USE_WCHAR_T is not defined. libstdc++-v3/ChangeLog: * src/c++11/cow-locale_init.cc: Add [[maybe_unused]] attribute. * src/c++17/fs_path.cc (path::_S_convert_loc): Likewise.

Re: [PATCH] libstdc++ Add cstdarg to freestanding

2023-09-07 Thread Jonathan Wakely via Gcc-patches
sal, and I'm working my >> way through the proposals one by one. >> Thank you for the feedback, I'll update and resend >> /Paul >> >> Den ons. 16. aug. 2023 kl. 15.51 skrev Arsen Arsenović : >>> >>> >>> Jonathan Wakely writes: >>&g

[committed] libstdc++: Add autoconf checks for mkdir, chmod, chdir, and getcwd

2023-09-07 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux. Built on avr. Pushed to trunk. -- >8 -- The filesystem code was using these functions without checking for their existence, assuming that any UNIX-like libc with would always provide them. That's not true for some newlib targets like arm-eabi. libstdc++-v3/ChangeLog:

[committed] libstdc++: Disable support by default for avr

2023-09-07 Thread Jonathan Wakely via Gcc-patches
libstdc++-v3/ChangeLog: * acinclude.m4 (GLIBCXX_ENABLE_BACKTRACE): Disable by default for avr. * configure: Regenerate. --- libstdc++-v3/acinclude.m4 | 5 - libstdc++-v3/configure| 5 - 2 files changed, 8 insertions(+), 2 deletions(-) diff --git

[PATCH] libstdc++: Reduce output of 'make check'

2023-09-07 Thread Jonathan Wakely via Gcc-patches
Any objections to this change? -- >8 -- This removes the 39 lines of shell commands that get echoed when starting the testsuite. The fact that near the end of that output it prints `echo "WARNING: could not find \`runtest'" 1>&2; :;` makes it look like that warning is actually being shown the

[committed] libstdc++: Fix tests that fail in C++23

2023-09-07 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux. Pushed to trunk. -- >8 -- The tests for the std::ranges access CPOs (ranges::begin etc) use pathological types with ridiculous overload sets for begin/end/data members, to exercise all the corner cases in the specification. Since P2278R4 "cbegin should always return a

[committed] libstdc++: Fix missing/misplaced { dg-options "-std=gnu++20" } in tests

2023-09-07 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux. Pushed to trunk. -- >8 -- These tests do not run by default, because the c++20 effective target selector isn't matched. libstdc++-v3/ChangeLog: * testsuite/23_containers/unordered_map/operations/1.cc: Add dg-options for C++20 mode. *

[committed] libstdc++: Simplify C++20 poison pill overloads (P2602R2)

2023-09-07 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux. Pushed to trunk. -- >8 -- This implements the C++23 change "Poison Pills are Too Toxic". This makes sense to do unconditionally for C++20, as the corner cases that it fixes are considered to be defects in the C++20 design (e.g. LWG3480 was needed to fix directory iterators

[committed] libstdc++: Avoid -Wunused-parameter warning in testsuite helper

2023-09-07 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux. Pushed to trunk. -- >8 -- libstdc++-v3/ChangeLog: * testsuite/util/testsuite_iterators.h (is_customization_point_object): Remove parameter name. --- libstdc++-v3/testsuite/util/testsuite_iterators.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

[committed] libstdc++: Rename C++20 Customization Point Objects

2023-09-07 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux. Pushed to trunk. -- >8 -- This makes the naming of the CPO types and namespaces simpler and more consistent. With this change the string "cust" won't appear in diagnostics related to these CPOs, which avoids confusion about what it means (customization? customer?). Users

[committed] libstdc++: Relax range adaptors for move-only types (P2494R2)

2023-09-07 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux. Pushed to trunk. -- >8 -- This is a C++23 feature that relaxes the constraints on some range adaptors, to support move-only types. libstdc++-v3/ChangeLog: * include/bits/version.def (ranges): Update value. * include/bits/version.h: Regenerate. *

Re: [RFC] libstdc++: Make --enable-libstdcxx-backtrace=auto default to yes

2023-09-06 Thread Jonathan Wakely via Gcc-patches
On Thu, 7 Sept 2023 at 00:10, Jonathan Wakely wrote: > > On Thu, 7 Sept 2023 at 00:09, Hans-Peter Nilsson wrote: > > > > > From: Jonathan Wakely > > > Date: Wed, 6 Sep 2023 23:30:08 +0100 > > > > > On Mon, 4 Sept 2023 at 17:49, Jonathan Wakely >

Re: [RFC] libstdc++: Make --enable-libstdcxx-backtrace=auto default to yes

2023-09-06 Thread Jonathan Wakely via Gcc-patches
On Thu, 7 Sept 2023 at 00:09, Hans-Peter Nilsson wrote: > > > From: Jonathan Wakely > > Date: Wed, 6 Sep 2023 23:30:08 +0100 > > > On Mon, 4 Sept 2023 at 17:49, Jonathan Wakely wrote: > > > > > > On Mon, 4 Sept 2023 at 17:47, Hans-Peter Nilsson via Libs

Re: [RFC] libstdc++: Make --enable-libstdcxx-backtrace=auto default to yes

2023-09-06 Thread Jonathan Wakely via Gcc-patches
On Mon, 4 Sept 2023 at 17:49, Jonathan Wakely wrote: > > On Mon, 4 Sept 2023 at 17:47, Hans-Peter Nilsson via Libstdc++ > wrote: > > > > > Date: Fri, 1 Sep 2023 12:16:40 +0100 > > > Reply-To: Jonathan Wakely > > > > > > On Wed, 23 Aug 2023 a

[committed] libstdc++: Disable support by default for freestanding

2023-09-06 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux and x86_64-elf. Pushed to trunk. -- >8 -- libstdc++-v3/ChangeLog: * acinclude.m4 (GLIBCXX_ENABLE_BACKTRACE): Disable by default for freestanding. * configure: Regenerate. --- libstdc++-v3/acinclude.m4 | 2 +- libstdc++-v3/configure| 2 +- 2 files

Re: [RFC] libstdc++: Make --enable-libstdcxx-backtrace=auto default to yes

2023-09-04 Thread Jonathan Wakely via Gcc-patches
On Mon, 4 Sept 2023 at 17:47, Hans-Peter Nilsson via Libstdc++ wrote: > > > Date: Fri, 1 Sep 2023 12:16:40 +0100 > > Reply-To: Jonathan Wakely > > > > On Wed, 23 Aug 2023 at 17:03, Jonathan Wakely via Libstdc++ > > wrote: > > > > > > Any

<    2   3   4   5   6   7   8   9   10   11   >