[committed] libstdc++: Fix tests broken by C++23 P2266R3 "Simpler implicit move"

2022-10-03 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux. Pushed to trunk. -- >8 -- In C++23 mode these tests started to FAIL because an rvalue reference parameter can no longer be bound to an lvalue reference return type. As confirmed by Ville (who added these tests) the problem overloads are not intended to be called, and only exi

Re: [PATCH 00/10] c-family,libstdc++: P1642 and related changes

2022-10-03 Thread Jonathan Wakely via Gcc-patches
On Fri, 30 Sept 2022 at 19:15, Jonathan Wakely wrote: > > On Fri, 30 Sept 2022 at 17:46, Arsen Arsenović via Libstdc++ > wrote: > > > > Hi, > > > > This patchset: > > - Implements the P1642 WG21 paper, with a fair few extensions, > > - Fixes libstdc++' build system on systems --without-headers, >

Re: [PATCH] Fix gdb printers for std::string

2022-10-03 Thread Jonathan Wakely via Gcc-patches
On Mon, 3 Oct 2022 at 17:51, François Dumont wrote: > > On 01/10/22 17:30, Jonathan Wakely wrote: > > On Sat, 1 Oct 2022 at 11:43, François Dumont wrote: > >> On 01/10/22 12:06, Jonathan Wakely wrote: > >>> On Sat, 1 Oct 2022 at 08:20, François Dumont via Libstdc++ > >>> wrote: > I had forg

[committed] libstdc++: Update status docs for compare_exchange padding bits

2022-10-03 Thread Jonathan Wakely via Gcc-patches
Pushed to trunk. -- >8 -- libstdc++-v3/ChangeLog: * doc/xml/manual/status_cxx2020.xml: Update C++20 status. * doc/html/manual/status.html: Regenerate. --- libstdc++-v3/doc/html/manual/status.html | 9 ++--- libstdc++-v3/doc/xml/manual/status_cxx2020.xml | 15 +

Re: [PATCH] libstdc++: Implement ranges::join_with_view from P2441R2

2022-10-04 Thread Jonathan Wakely via Gcc-patches
On Tue, 4 Oct 2022 at 02:11, Patrick Palka via Libstdc++ wrote: > > Tested on x86_64-pc-linux-gnu, does this look OK for trunk? FWIW using OK, thanks. > variant<_PatternIter, _InnerIter> in the implementation means we need to > include from , which increases the preprocessed size > of by 3% (

[committed] libstdc++: Enable std::hash> [PR107139]

2022-10-04 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64le-linux, and x86_64-linux with -ffreestanding. Pushed to trunk. -- >8 -- Everything that depends on is available for freestanding now. libstdc++-v3/ChangeLog: PR libstdc++/107139 * include/std/coroutine: Remove all _GLIBCXXHOSTED preprocessor conditiona

[committed] libstdc++: Make work freestanding [PR107134]

2022-10-04 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64le-linux, and x86_64-linux with -ffreestanding. Pushed to trunk. -- >8 -- When gcc/config.gcc defines use_gcc_stdin=wrap, GCC's tries to use libc's unless -ffreestanding is used. When libstdc++ is configured --disable-hosted-libstdcxx we want to work even without -ffreestandin

[committed] libstdc++: Disable test for freestanding

2022-10-04 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux with -ffreestanding. Pushed to trunk. -- >8 -- This test checks the exception-safety of std::stable_sort if copying a value throws. For freestanding we don't allocate in std::stable_sort anyway, and the exception thrown via __throw_runtime_error terminates, so disable the test

[committed] libstdc++: Define functions for freestanding [PR107135]

2022-10-04 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64le-linux, and x86_64-linux with -ffreestanding. Pushed to trunk. -- >8 -- We don't compile src/c++11/functexcept.cc for freestanding, so just define the functions used by freestanding entities as inline calls to std::terminate. libstdc++-v3/ChangeLog: PR libstdc++/107135

Re: [PATCH] libstdc++: Implement ranges::join_with_view from P2441R2

2022-10-04 Thread Jonathan Wakely via Gcc-patches
On Tue, 4 Oct 2022 at 15:09, Patrick Palka wrote: > > On Tue, 4 Oct 2022, Jonathan Wakely wrote: > > > On Tue, 4 Oct 2022 at 02:11, Patrick Palka via Libstdc++ > > wrote: > > > > > > Tested on x86_64-pc-linux-gnu, does this look OK for trunk? FWIW using > > > > OK, thanks. > > Thanks a lot, patch

[committed] libstdc++: Refactor seed sequence constraints in

2022-10-04 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64le-linux. Pushed to trunk. -- >8 -- Every use of _If_seed_seq in and uses it with enable_if. We can just move the enable_if into the helper alias instead of repeating it everywhere. libstdc++-v3/ChangeLog: * include/bits/random.h (__is_seed_seq): Replace with ...

[committed] libstdc++: Fix test FAIL for old std::string ABI

2022-10-04 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64le-linux. Pushed to trunk. -- >8 -- libstdc++-v3/ChangeLog: * testsuite/std/ranges/adaptors/join_with/1.cc: Remove unused #include -#include -#include +#include #include #include @@ -73,7 +72,10 @@ test03() return true; } -constexpr bool +#if _GL

[committed] libstdc++: Use new built-ins __remove_cv, __remove_reference etc.

2022-10-04 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64le-linux. Pushed to trunk. -- >8 -- libstdc++-v3/ChangeLog: * include/std/type_traits (remove_cv): Use __remove_cv built-in. (remove_reference): Use __remove_reference built-in. (remove_cvref): Use __remove_cvref built-in. Remove inheritance for fa

[RFC] libstdc++: Generate error_constants.h from [PR104883]

2022-10-04 Thread Jonathan Wakely via Gcc-patches
Does anybody see any issues with generating the list of error numbers at build time? -- >8 -- Instead of having several very similar target-specific headers with slightly different sets of enumerators, generate the error_constants.h file as part of the build. This ensures that all enumerators ar

Re: [RFC] libstdc++: Generate error_constants.h from [PR104883]

2022-10-04 Thread Jonathan Wakely via Gcc-patches
On Tue, 4 Oct 2022 at 17:51, Jonathan Wakely via Libstdc++ wrote: > > Does anybody see any issues with generating the list of error numbers at > build time? > > > -- >8 -- > > Instead of having several very similar target-specific headers with > slightly different sets of enumerators, generate the

Re: [RFC] libstdc++: Generate error_constants.h from [PR104883]

2022-10-04 Thread Jonathan Wakely via Gcc-patches
On Tue, 4 Oct 2022 at 19:05, Jonathan Wakely wrote: > > On Tue, 4 Oct 2022 at 17:51, Jonathan Wakely via Libstdc++ > wrote: > > > > Does anybody see any issues with generating the list of error numbers at > > build time? > > > > > > -- >8 -- > > > > Instead of having several very similar target-sp

[committed] libstdc++: Guard use of new built-in with __has_builtin

2022-10-05 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux, pushed to trunk. -- >8 -- Another case where I forgot that non-GCC compilers don't have this built-in yet. libstdc++-v3/ChangeLog: * include/bits/invoke.h (__invoke_r): Check __has_builtin(__reference_converts_from_temporary) before using built-in. -

[committed] libtdc++: Regenerate Makefile.in after freestanding header changes

2022-10-05 Thread Jonathan Wakely via Gcc-patches
I forgot to do this after applying Arsen's patches to my tree. Tested x86_64-linux. Pushed to trunk. -- >8 -- libstdc++-v3/ChangeLog: * include/Makefile.in: Regenerate. --- libstdc++-v3/include/Makefile.in | 101 +++ 1 file changed, 49 insertions(+), 52 dele

Re: [PING 2] [PATCH] libstdc++: basic_filebuf: don't flush more often than necessary.

2022-10-06 Thread Jonathan Wakely via Gcc-patches
Sorry for the lack of review. I've been trying to remember (and find) some previous discussions related to this topic, but haven't managed to find it yet. The patch does look sensible (and is the same as the one attached to PR 63746) so I'll make sure to review it in time for the GCC 13 cut-off.

Re: [PING 2] [PATCH] libstdc++: basic_filebuf: don't flush more often than necessary.

2022-10-06 Thread Jonathan Wakely via Gcc-patches
On Thu, 6 Oct 2022 at 17:33, Charles-François Natali wrote: > > On Thu, Oct 6, 2022, 14:29 Jonathan Wakely wrote: >> >> Sorry for the lack of review. I've been trying to remember (and find) >> some previous discussions related to this topic, but haven't managed >> to find it yet. > > > No worries

Re: [PATCH] libstdc++: Introduce GNU/Hurd-specific libstdc++ os-defines.h

2022-10-07 Thread Jonathan Wakely via Gcc-patches
As documented at https://gcc.gnu.org/lists.html all patches for libstdc++ need to be CC'd to the libstdc++ list. That's why your patch has not been reviewed, because I didn't see it. On 29/08/22 02:30 +0200, Samuel Thibault wrote: This is notably needed because in glibc 2.34, the move of pthread

Re: [committed] Fix comment typos

2022-10-07 Thread Jonathan Wakely via Gcc-patches
On 07/10/22 09:11 +0200, Jakub Jelinek wrote: --- gcc/ipa-prop.h.jj 2022-05-25 11:07:29.516188277 +0200 +++ gcc/ipa-prop.h 2022-10-06 16:12:52.157055672 +0200 @@ -78,7 +78,7 @@ struct ipa_cst_ref_desc; /* Structure holding data required to describe a constant jump function. */ struct GTY(

Re: gcc-12: FTBFS on hurd-i386

2022-10-07 Thread Jonathan Wakely via Gcc-patches
On 06/10/22 18:01 +0200, Svante Signell via Gcc-patches wrote: gcc-12-12.2.0-4/5 in sid FTBFS on hurd-i386 due to failing linkage of pthread_once (same error for gcc-11, gcc-12, gcc-snapshot): /<>/build/i686-gnu/libstdc++-v3/include/i686-gnu/bits/gthr- default.h:700: undefined reference to `pthre

[committed] libstdc++: Use bold style for DR titles in the manual

2022-10-07 Thread Jonathan Wakely via Gcc-patches
Pushed to trunk. -- >8-- This matches how the issues are styled in the LWG issues list, and also allows us to use italics for "cv" (e.g. in issue 2487). libstdc++-v3/ChangeLog: * doc/xml/manual/intro.xml: Add role="bold" attribute to emphasis elements for issue titles. *

[committed] libstdc++: Shuffle header dependencies of

2022-10-07 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux, Pushed to trunk. -- >8 -- The header is needed by std::function to use placement new, so include it in instead of in . libstdc++-v3/ChangeLog: * include/bits/std_function.h: Include but do not include . * include/std/functional: Do not include . -

[committed] libstdc++: Add --disable-libstdcxx-hosted as an alias for hosted-libstdcxx

2022-10-07 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux, Pushed to trunk. -- >8 -- Most libstdc++ configure args are of the form --enable-libstdcxx-xxx but the option to build freestanding is --disable-hosted-libstdcxx. If you accidentally type --disable-libstdcxx-hosted then it will be ignored. This adds --disable-libstdcxx-hoste

[PATCH] libstdc++: Allow emergency EH alloc pool size to be tuned [PR68606]

2022-10-07 Thread Jonathan Wakely via Gcc-patches
This needs a little more documentation (see the TODO in the manual), rather than just the comments in the source. This isn't final, but I think it's the direction I want to take. -- >8 -- Implement a long-standing request to support tuning the size of the emergency buffer for allocating exception

Re: [PATCH] libstdc++: Allow emergency EH alloc pool size to be tuned [PR68606]

2022-10-10 Thread Jonathan Wakely via Gcc-patches
On Mon, 10 Oct 2022 at 07:18, Richard Biener wrote: > > On Fri, Oct 7, 2022 at 5:55 PM Jonathan Wakely via Gcc-patches > wrote: > > > > This needs a little more documentation (see the TODO in the manual), > > rather than just the comments in the source. This isn't

[committed] libstdc++: std::make_signed_t should be ill-formed

2022-10-10 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64le-linux. Pushed to trunk. -- >8 -- Currently we only reject std::make_signed_t but not cv bool. Similarly for std::make_unsigned_t. As well as making those ill-formed, this adds a requires-clause to the make_signed and make_unsigned primary templates. This makes non-integral, no

Re: [committed] libstdc++: std::make_signed_t should be ill-formed

2022-10-10 Thread Jonathan Wakely via Gcc-patches
On Mon, 10 Oct 2022 at 14:50, Tim Song via Libstdc++ wrote: > > On Mon, Oct 10, 2022 at 8:09 AM Patrick Palka via Libstdc++ > wrote: > > > > On Mon, 10 Oct 2022, Jonathan Wakely via Libstdc++ wrote: > > > > > Tested powerpc64le-linux. Pushed to trunk. > > > > > > -- >8 -- > > > > > > Currently we

Re: [PATCH] libstdc++: Allow emergency EH alloc pool size to be tuned [PR68606]

2022-10-10 Thread Jonathan Wakely via Gcc-patches
On Mon, 10 Oct 2022 at 12:17, Jonathan Wakely wrote: > > On Mon, 10 Oct 2022 at 07:18, Richard Biener > wrote: > > > > On Fri, Oct 7, 2022 at 5:55 PM Jonathan Wakely via Gcc-patches > > wrote: > > > > > > This needs a little more documentation (s

Re: [patch] configury support for VxWorks shared libraries

2022-10-10 Thread Jonathan Wakely via Gcc-patches
On Mon, 10 Oct 2022 at 19:06, Olivier Hainque via Libstdc++ wrote: > > Sorry, I forgot to cc libstdc++ on > > https://gcc.gnu.org/pipermail/gcc-patches/2022-October/603182.html > > which includes a regen of libstdc++-v3/configure after an update > libtool.m4. OK, thanks for the heads up.

Re: [committed] libstdc++: std::make_signed_t should be ill-formed

2022-10-10 Thread Jonathan Wakely via Gcc-patches
On Mon, 10 Oct 2022 at 15:05, Jonathan Wakely wrote: > > On Mon, 10 Oct 2022 at 14:50, Tim Song via Libstdc++ > wrote: > > > > On Mon, Oct 10, 2022 at 8:09 AM Patrick Palka via Libstdc++ > > wrote: > > > > > > On Mon, 10 Oct 2022, Jonathan Wakely via Libstdc++ wrote: > > > > > > > Tested powerpc6

Re: [PATCH] libstdc++: Allow emergency EH alloc pool size to be tuned [PR68606]

2022-10-11 Thread Jonathan Wakely via Gcc-patches
gt; > > > > > > > On Fri, Oct 7, 2022 at 5:55 PM Jonathan Wakely via Gcc-patches > > > > wrote: > > > > > > > > > > This needs a little more documentation (see the TODO in the manual), > > > > > rather than just th

Re: [PATCH] libstdc++: Allow emergency EH alloc pool size to be tuned [PR68606]

2022-10-11 Thread Jonathan Wakely via Gcc-patches
On Tue, 11 Oct 2022, 19:38 David Edelsohn via Libstdc++, < libstd...@gcc.gnu.org> wrote: > This patch seems to have broken bootstrap on AIX. It seems to assume > methods that aren't guaranteed to be defined. > It doesn't use anything that wasn't already used by that file. I have no idea how it

Re: [PATCH] libstdc++: Implement ranges::repeat_view from P2474R2

2022-10-11 Thread Jonathan Wakely via Gcc-patches
On Tue, 11 Oct 2022 at 03:51, Patrick Palka via Libstdc++ wrote: > > Tested on x86_64-pc-linux-gnu, does this look OK for trunk? (The paper > also makes changes to views::take and views::drop, which will be > implemented separately.) OK, thanks.

Re: [PATCH] libstdc++: Allow emergency EH alloc pool size to be tuned [PR68606]

2022-10-11 Thread Jonathan Wakely via Gcc-patches
On Tue, 11 Oct 2022 at 19:58, Jonathan Wakely wrote: > > > > On Tue, 11 Oct 2022, 19:38 David Edelsohn via Libstdc++, > wrote: >> >> This patch seems to have broken bootstrap on AIX. It seems to assume >> methods that aren't guaranteed to be defined. > > > > It doesn't use anything that wasn't a

[committed] libstdc++: Fix -Wmaybe-uninitialized false positive [PR103984]

2022-03-01 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64le-linux, pushed to trunk. -- >8 -- This fixes a false positive warning seen with LTO: 12/bits/regex_compiler.tcc:443:32: error: '__last_char._M_char' may be used uninitialized [-Werror=maybe-uninitialized] Given that the std::regex code is not very efficient anyway, the overhe

[committed] libstdc++: Implement std::strong_order for floating-point types [PR96526]

2022-03-03 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux (-m32/-m64), powerpc64-linux (-m32/-m64), powerpc64le-linux, powerpc-aix (maix32/-maix64/-mlong-double-128). Pushed to trunk. I'm inclined to backport this to gcc-11 after some soak time on trunk (but not gcc-10, because it needs __builtin_bit_cast). -- >8 -- This removes a F

[committed] libstdc++: Fix test failure on AIX

2022-03-03 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux, pushed to trunk. -- >8 -- This fixes a test failure due to a non-reserved name in an AIX system header (included via ). That name clashes with one of the names we check our own headers for, so skip checking that name on AIX. libstdc++-v3/ChangeLog: * testsuite/17_in

[committed] libstdc++: Use non-debug vector in constexpr test [PR104748]

2022-03-03 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux, pushed to trunk. -- >8 -- The std::__debug::vector isn't usable in constant expressions, so this test fails in debug mode. Until the debug vector is fixed we can just make the test use the non-debug one. libstdc++-v3/ChangeLog: PR libstdc++/104748 * testsuit

Re: [PATCH] libstdc++: vxworks: remove stray include

2022-03-04 Thread Jonathan Wakely via Gcc-patches
On Fri, 4 Mar 2022 at 08:28, Rasmus Villemoes wrote: > > There doesn't seem to be any reason for this TU to include > , and it causes errors when the resulting libstdc++ is used > on our VxWorks 5.5 target - presumably because now libstdc++ itself > contains an instance of std::ios_base::Init. Whic

[committed] libstdc++: Fix -Wunused-local-typedefs warning in

2022-03-04 Thread Jonathan Wakely via Gcc-patches
On 03/03/22 22:38 +, Jonathan Wakely wrote: Tested x86_64-linux (-m32/-m64), powerpc64-linux (-m32/-m64), powerpc64le-linux, powerpc-aix (maix32/-maix64/-mlong-double-128). Pushed to trunk. I'm inclined to backport this to gcc-11 after some soak time on trunk (but not gcc-10, because it need

[committed] libstdc++: Ensure __glibcxx_assert_fail has default visibility

2022-03-05 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64le-linux, pushed to trunk. -- >8 -- This ensures there's no linker error if libstdc++ headers are included following a pragma that sets hidden visibility. Similarly for std::__terminate, which is always-inline so shouldn't matter, but it's not wrong to do this anyway. libstdc++-

Re: [committed] libstdc++: Ensure __glibcxx_assert_fail has default visibility

2022-03-07 Thread Jonathan Wakely via Gcc-patches
On Sat, 5 Mar 2022 at 20:34, Jonathan Wakely via Libstdc++ wrote: > > Tested powerpc64le-linux, pushed to trunk. > > -- >8 -- > > This ensures there's no linker error if libstdc++ headers are included > following a pragma that sets hidden visibility. > > Similarly for std::__terminate, which is al

[committed] doc: Remove redundant sentence about modules being in C++20

2022-03-07 Thread Jonathan Wakely via Gcc-patches
Discussed with Jason and then committed as obvious. -- >8 -- As C++20 has already been published, we don't need to link to the draft (which is now the C++23 draft anyway). And there's no need to say it's part of the C++20 spec, or that there might be defect reports. That's true for everything in

[committed] libstdc++: Remove incorrect copyright notice from header

2022-03-08 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64le-linux, pushed to trunk. Backport to gcc-11 to follow. -- >8 -- This file has the SGI copyright notice, but contains no code from the SGI STL. It was entirely written by me in 2019, originally as part of the header. When I extracted it into a new header I accidentally copied ac

[committed] contrib: Fix gcc-descr script [PR102664]

2022-03-08 Thread Jonathan Wakely via Gcc-patches
Pushed to trunk. -- >8 -- POSIX expr does not support the 'match' keyword, so the git-descr.sh scripts should use ':' instead. contrib/ChangeLog: PR other/102664 * git-descr.sh: Use portable form of expr match. --- contrib/git-descr.sh | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH] contrib: Fix non-portable sed commands in gcc-descr [PR102664/]

2022-03-08 Thread Jonathan Wakely via Gcc-patches
This now works with Solaris /usr/xpg4/bin/sed and should work with BSD sed too. OK for trunk? -- >8 -- POSIX sed does not support \? or \+ in its Basic Regular Expression grammar. Replace the \(tags/\)\? part of the pattern with a substitution to remove ^tags/ before other substitutions. Replace

Re: [PATCH] rs6000, v2: Fix up __SIZEOF_{FLOAT, IBM}128__ defines [PR99708]

2022-03-09 Thread Jonathan Wakely via Gcc-patches
On Wed, 9 Mar 2022 at 13:27, Jakub Jelinek wrote: > On Mon, Mar 07, 2022 at 03:37:18PM -0600, Segher Boessenkool wrote: > > > * config/rs6000/rs6000-gen-builtins.cc (TYPE_MAP_SIZE): Set to > > > 85 instead of 86. > > > > This should be auto-generated, or just not exist at all > > ("sizeof

Re: [PATCH] contrib: Avoid use of "echo -n" in git customization [PR102664]

2022-03-09 Thread Jonathan Wakely via Gcc-patches
On 09/03/22 12:15 +, Richard Earnshaw wrote: The -n option to echo is non-portable. The generally recommended alternative is to use the shell printf command. contrib/ChangeLog: PR other/102664 * gcc-git-customization.sh (ask): Use printf instead of echo -n. diff --git a/co

Re: [PATCH] contrib: Fix non-portable sed commands in gcc-descr [PR102664/]

2022-03-09 Thread Jonathan Wakely via Gcc-patches
On Wed, 9 Mar 2022 at 14:01, Mikael Morin wrote: > > Hello, > > Le 08/03/2022 à 18:58, Jonathan Wakely via Gcc-patches a écrit : > > Replace \([0-9]\+\) with \([0-9][0-9]*\) or with \([1-9][0-9]*\) in release > > branch numbers, where > > a leading zero does not o

Re: [PATCH] contrib: Fix non-portable sed commands in gcc-descr [PR102664/]

2022-03-09 Thread Jonathan Wakely via Gcc-patches
On Wed, 9 Mar 2022 at 17:40, Patrick Palka wrote: > > On Wed, Mar 9, 2022 at 8:54 AM Mikael Morin wrote: > > > > Hello, > > > > Le 08/03/2022 à 18:58, Jonathan Wakely via Gcc-patches a écrit : > > > Replace \([0-9]\+\) with \([0-9][0-9]*\) or with \([1-9][0

[committed] libstdc++: Support VAX floats in std::strong_order

2022-03-10 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux, and basic soundness check on vax-dec-netbsdelf. Pushed to trunk. -- >8 -- The VAX float and double format does not support NaN, so the std::partial_ordering returned by <=> will never be 'unordered'. We can just use the partial_ordering value as the strong_ordering. libstdc

Re: [committed] libstdc++: Support VAX floats in std::strong_order

2022-03-10 Thread Jonathan Wakely via Gcc-patches
On Thu, 10 Mar 2022 at 11:53, Jonathan Wakely via Libstdc++ wrote: > > Tested x86_64-linux, and basic soundness check on vax-dec-netbsdelf. But apparently not enough of a soundness check, because isnan(__builtin_nan("")) is true for VAX, so GCC seems to have a NaN pattern, despite what I read onl

Re: [committed] libstdc++: Support VAX floats in std::strong_order

2022-03-10 Thread Jonathan Wakely via Gcc-patches
On Thu, 10 Mar 2022 at 12:16, Jonathan Wakely wrote: > > On Thu, 10 Mar 2022 at 11:53, Jonathan Wakely via Libstdc++ > wrote: > > > > Tested x86_64-linux, and basic soundness check on vax-dec-netbsdelf. > > But apparently not enough of a soundness check, because > isnan(__builtin_nan("")) is true

Re: [PATCH] c++: fold calls to std::move/forward [PR96780]

2022-03-10 Thread Jonathan Wakely via Gcc-patches
On Thu, 10 Mar 2022 at 15:27, Patrick Palka wrote: > Here's a patch that extends the folding to as_const and addressof (as > well as __addressof, which I'm kind of unsure about since it's > non-standard). N.B. libstdc++ almost never uses std::addressof, because that calls std::__addressof, so we j

[committed] libstdc++: Move closing brace outside #endif [PR104866]

2022-03-10 Thread Jonathan Wakely via Gcc-patches
From: Detlef Vollmann Tested x86_64-linux, pushed to trunk. -- >8-- Author: Detlef Vollmann libstdc++-v3/ChangeLog: PR libstdc++/104866 * include/bits/this_thread_sleep.h: Fix order of #endif and closing brace of namespace. --- libstdc++-v3/include/bits/this_thread_s

[committed] libstdc++: Do not use fast_float for 16-bit size_t [PR104870]

2022-03-10 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux and built on msp430-elf, pushed to trunk. -- >8 -- The preprocessor condition for using fast_float should match the one in the header, and require at least 32-bit size_t. libstdc++-v3/ChangeLog: PR libstdc++/104870 * src/c++17/floating_from_chars.cc: Check __

Re: [committed] libstdc++: Move closing brace outside #endif [PR104866]

2022-03-11 Thread Jonathan Wakely via Gcc-patches
On Fri, 11 Mar 2022 at 14:28, Detlef Vollmann wrote: > > Hi Jonathan, > > On 3/10/22 22:11, Jonathan Wakely wrote: > > > Tested x86_64-linux, pushed to trunk. > > Thanks. > With this and the other fix I was able to build the complete > libstdc++ for AVR based on AVR Libc 2.0 (plus some ad hoc > AVR

Re: [committed] libstdc++: Move closing brace outside #endif [PR104866]

2022-03-11 Thread Jonathan Wakely via Gcc-patches
On Fri, 11 Mar 2022 at 15:12, Jonathan Wakely wrote: > > On Fri, 11 Mar 2022 at 14:28, Detlef Vollmann wrote: > > > > Hi Jonathan, > > > > On 3/10/22 22:11, Jonathan Wakely wrote: > > > > > Tested x86_64-linux, pushed to trunk. > > > > Thanks. > > With this and the other fix I was able to build the

Re: [committed] libstdc++: Move closing brace outside #endif [PR104866]

2022-03-11 Thread Jonathan Wakely via Gcc-patches
On Fri, 11 Mar 2022 at 15:35, Detlef Vollmann wrote: > > On 3/11/22 16:12, Jonathan Wakely wrote: > > On Fri, 11 Mar 2022 at 14:28, Detlef Vollmann wrote: > >> With this and the other fix I was able to build the complete > >> libstdc++ for AVR based on AVR Libc 2.0 (plus some ad hoc > >> AVR header

[PATCH] libstdc++: Ensure that std::from_chars is declared when supported

2022-03-11 Thread Jonathan Wakely via Gcc-patches
Patrick, I think this is right, but please take a look to double check. I think we should fix the feature-test macro conditions for gcc-11 too, although it's a bit more complicated there. It should depend on IEEE float and double *and* uselocale. We don't need the other changes on the branch. --

[PATCH] top-level: Fix comment about --enable-libstdcxx in configure

2022-03-11 Thread Jonathan Wakely via Gcc-patches
I'm going to push this as obvious, but do I need to do anything special to sync it with binutils, or will that happen next time somebody needs a proper fix? -- >8 -- The custom option for enabling/disabling libstdc++ is not spelled the same as the directory name: AC_ARG_ENABLE(libstdcxx, AS_HELP

[committed] libstdc++: Fix reading UTF-8 characters for 16-bit targets [PR104875]

2022-03-14 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64le-linux and sparc-sun-solaris2.11, pushed to trunk. This should be backported too. It's not a regression, but this code is just broken on 16-bit targets. -- >8 -- The current code in read_utf8_code_point assumes that integer promotion will create a 32-bit int, but that's not tru

Re: [PATCH] top-level: Fix comment about --enable-libstdcxx in configure

2022-03-14 Thread Jonathan Wakely via Gcc-patches
Pushed to trunk now. On 11/03/22 18:38 +, Jonathan Wakely wrote: I'm going to push this as obvious, but do I need to do anything special to sync it with binutils, or will that happen next time somebody needs a proper fix? -- >8 -- The custom option for enabling/disabling libstdc++ is not s

Re: [PATCH] libstdc++: Ensure that std::from_chars is declared when supported

2022-03-14 Thread Jonathan Wakely via Gcc-patches
On Mon, 14 Mar 2022 at 14:17, Patrick Palka via Libstdc++ wrote: > > On Fri, 11 Mar 2022, Jonathan Wakely wrote: > > > Patrick, I think this is right, but please take a look to double check. > > > > I think we should fix the feature-test macro conditions for gcc-11 too, > > although it's a bit mor

Re: [PATCH] wwwdocs: fedora-devel-list archives changes

2022-03-15 Thread Jonathan Wakely via Gcc-patches
On 12/03/22 22:55 +0100, Gerald Pfeifer wrote: I have *NOT* pushed this yet, looking for feedback: It appears redhat.com has lost Fedora mailing list archives, which are now at lists.fedoraproject.org using completely different tooling. Jakub, is there a better way than the patch below? This

Re: [PATCH] libstdc++: Ensure that std::from_chars is declared when supported

2022-03-16 Thread Jonathan Wakely via Gcc-patches
On Tue, 15 Mar 2022 at 14:12, Patrick Palka wrote: > > On Mon, 14 Mar 2022, Jonathan Wakely wrote: > > > On Mon, 14 Mar 2022 at 14:17, Patrick Palka via Libstdc++ > > wrote: > > > > > > On Fri, 11 Mar 2022, Jonathan Wakely wrote: > > > > > > > Patrick, I think this is right, but please take a look

Re: [PATCH] libstdc++: Ensure that std::from_chars is declared when supported

2022-03-16 Thread Jonathan Wakely via Gcc-patches
On Mon, 14 Mar 2022 at 14:15, Patrick Palka wrote: > I think __floating_from_chars_hex should work fine on 16 bit targets, > so I suppose we could use it in the !USE_LIB_FAST_FLOAT branch as well. Good point, and even for SIZE_WIDTH >= 32, it might be faster to use your __floating_from_chars_hex f

[committed] libstdc++: Fix symbol versioning for Solaris 11.3 [PR103407]

2022-03-16 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux and sparc-sun-solaris2.11 (but 11.3 only). Pushed to trunk. Rainer, this should allow you to continue omitting the _ZSt10from_charsPKcS0_R[def]St12chars_format symbols from the baseline, without the current FAIL. Please check on your other Solaris targets. -- >8 -- The new s

Re: [PATCH v2] middle-end/104854: Limit strncmp overread warnings

2022-03-17 Thread Jonathan Wakely via Gcc-patches
On 15/03/22 14:36 -0600, Martin Sebor wrote: On 3/15/22 10:40, Siddhesh Poyarekar wrote: On 15/03/2022 21:09, Martin Sebor wrote: The strncmp function takes arrays as arguments (not necessarily strings).? The main purpose of the -Wstringop-overread warning for calls to it is to detect calls whe

[committed] libstdc++: Fix comment in testsuite utility

2022-03-17 Thread Jonathan Wakely via Gcc-patches
Pushed as obvious. -- >8 -- libstdc++-v3/ChangeLog: * testsuite/util/testsuite_character.h: Fix comment. --- libstdc++-v3/testsuite/util/testsuite_character.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/libstdc++-v3/testsuite/util/testsuite_character.h b/li

[committed] libstdc++: Rewrite __moneypunct_cache::_M_cache [PR104966]

2022-03-17 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64le-linux, pushed to trunk. -- >8 -- GCC thinks the following can lead to a buffer overflow when __ns.size() equals zero: const basic_string<_CharT>& __ns = __mp.negative_sign(); _M_negative_sign_size = __ns.size(); __negative_sign = new _CharT[_M_neg

[committed] libstdc++: Avoid including in [PR92546]

2022-03-17 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux, x86_64-mingw, pushed to trunk. -- >8 -- This only affects Windows, but reduces the preprocessed size of significantly. libstdc++-v3/ChangeLog: PR libstdc++/92546 * include/bits/fs_path.h (path::make_preferred): Use handwritten loop instead of std::r

[PATCH] libstdc++: Reduce header dependencies from PSTL headers [PR92546]

2022-03-17 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux. Tom, any objection? -- >8 -- This avoids including the whole of in , as the header only actually needs std::pair. This also avoids including in , which only needs , std::bad_alloc, and std::terminate (which can be repalced with std::__terminate). This matters less, becaus

Re: [PATCH] libstdc++: Reduce header dependencies from PSTL headers [PR92546]

2022-03-18 Thread Jonathan Wakely via Gcc-patches
On Thu, 17 Mar 2022 at 20:44, Thomas Rodgers wrote: > > Looks ok to me. I just am curious, does the change to src/c++17/fs_path.cc > need to be part of this change (It's not obvious to me that it is related to > the other changes in the patch). It's related. fs_path.cc uses std::array but was no

Re: [PATCH] libstdc++: Reduce header dependencies from PSTL headers [PR92546]

2022-03-18 Thread Jonathan Wakely via Gcc-patches
On Fri, 18 Mar 2022 at 10:16, Jonathan Wakely wrote: > > On Thu, 17 Mar 2022 at 20:44, Thomas Rodgers wrote: > > > > Looks ok to me. I just am curious, does the change to src/c++17/fs_path.cc > > need to be part of this change (It's not obvious to me that it is related > > to the other changes in

Re: [committed] libstdc++: Fix symbol versioning for Solaris 11.3 [PR103407]

2022-03-18 Thread Jonathan Wakely via Gcc-patches
On Fri, 18 Mar 2022 at 11:49, Rainer Orth wrote: > > Hi Jonathan, > > > Tested x86_64-linux and sparc-sun-solaris2.11 (but 11.3 only). > > > > Pushed to trunk. > > > > Rainer, this should allow you to continue omitting the > > _ZSt10from_charsPKcS0_R[def]St12chars_format symbols from the baseline,

Re: [committed] libstdc++: Fix symbol versioning for Solaris 11.3 [PR103407]

2022-03-18 Thread Jonathan Wakely via Gcc-patches
On Fri, 18 Mar 2022 at 12:47, Rainer Orth wrote: > > Hi Jonathan, > > > I did some very brief testing and it seemed like a program linked to > > the Solaris 11.3 libstdc++.so.6.0.30 (with from_chars@GLIBCXX_3.4.30) > > can still run against libstdc++.so.6.0.30 with > > from_chars@GLIBCXX_3.4.29 (wh

[committed] libstdc++: Simplify constraints for std::any construction [PR104242]

2022-03-18 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64le-linux, pushed to trunk, -- >8 -- Partially revert r12-4190-g6da36b7d0e43b6f9281c65c19a025d4888a25b2d because using __and_<..., is_copy_constructible> when T is incomplete results in an error about deriving from is_copy_constructible when that is incomplete. I don't know how to

Re: [committed] libstdc++: Simplify constraints for std::any construction [PR104242]

2022-03-18 Thread Jonathan Wakely via Gcc-patches
Oops, I meant to change the commit summary line to Un-simplify, since it was reverting the "Simplify constaints ..." commit. On Fri, 18 Mar 2022 at 15:43, Jonathan Wakely via Libstdc++ wrote: > > Tested powerpc64le-linux, pushed to trunk, > > -- >8 -- > > Partially revert r12-4190-g6da36b7d0e43b

[committed] testsuite: Add missing header to test

2022-03-18 Thread Jonathan Wakely via Gcc-patches
This fixes a new FAIL caused by my r12-7699 change to libstdc++ headers. Pushed to trunk as obvious. -- >8 -- gcc/testsuite/ChangeLog: * g++.dg/torture/pr104601.C: Include . --- gcc/testsuite/g++.dg/torture/pr104601.C | 1 + 1 file changed, 1 insertion(+) diff --git a/gcc/testsuite/g+

Re: [PATCH] libstdc++: Work around clang misdesign in time_get<>::get [PR104990]

2022-03-21 Thread Jonathan Wakely via Gcc-patches
On Mon, 21 Mar 2022 at 06:42, Jakub Jelinek wrote: > > Hi! > > Apparently clang has a -fgnuc-version= option which allows it to pretend > it is any GCC version the user likes. It is already bad that it claims to > be GCC 4.2 compatible by default when it is not (various unimplemented > extensions

Re: [PATCH] libstdc++-v3 testsuite: Call fesetround(FE_DOWNWARD) only if defined

2022-03-22 Thread Jonathan Wakely via Gcc-patches
On Tue, 22 Mar 2022 at 15:48, Hans-Peter Nilsson via Libstdc++ wrote: > > Ok to commit? OK, thanks. > > - 8< - > > Without this, for a typical soft-float target such as cris-elf, after > commit r12-7676-g5a4e208022e704 you'll see, in libstdc++.log: > ... > FAIL: 20_util/from_chars/6.cc

[committed] libstdc++: Disable atomic wait for freestanding [PR105021]

2022-03-23 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64le-linux, pushed to trunk. Backport to gcc-11 needed too. -- >8 -- We use either condition variables or futexes to implement atomic waits, so we can't do it in freestanding. This is non-conforming, so should be revisited later, probably by making freestanding atomic waiting opera

[committed] libstdc++: Fix feature test macros in for freestanding

2022-03-23 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64le-linux, pushed to trunk. Backport to gcc-11 needed too. -- >8 -- Some C++17 and C++20 feature test macros are only defined in for hosted builds, even though the features are supported for freestanding. All C++23 feature test macros are defined in for freestanding, but most o

[committed] libstdc++: Add missing constraints to std::bit_cast [PR105027]

2022-03-23 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64le-linux, pushed to trunk. Backport to gcc-11 to follow. -- >8 -- Our std::bit_cast was relying on the compiler to check for errors inside __builtin_bit_cast, instead of checking them as constraints. That means std::bit_cast was not SFINAE-friendly. This fix uses a requires-clau

[wwwdocs] Add functions that require to GCC 12 porting-to docs

2022-03-25 Thread Jonathan Wakely via Gcc-patches
Pushed to wwwdocs. --- htdocs/gcc-12/porting_to.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/gcc-12/porting_to.html b/htdocs/gcc-12/porting_to.html index 470703c7..079bda30 100644 --- a/htdocs/gcc-12/porting_to.html +++ b/htdocs/gcc-12/porting_to.html @@ -67,7

[committed] libstdc++: Add more doxygen comments in

2022-03-25 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64le-linux, pushed to trunk. -- >8 -- libstdc++-v3/ChangeLog: * include/std/bit (bit_cast, byteswap, endian): Add doxygen comments. --- libstdc++-v3/include/std/bit | 20 +++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/libstdc++-v

[committed] libstdc++: Define std::expected for C++23 (P0323R12)

2022-03-27 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64le-linux, pushed to trunk. It's late in stage 4 to be adding new features, but this is C++23-only so entirely experimental, and not defined for the std-gnu++17 default (or even -std=gnu++20). It does mean that the old (very old) std::unexpected function is no longer available in C+

[committed] libstdc++: Fix typos in comments in tests

2022-03-28 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux, pushed to trunk. -- >8 -- libstdc++-v3/ChangeLog: * testsuite/20_util/optional/monadic/and_then.cc: Fix typo. * testsuite/20_util/optional/monadic/transform.cc: Likewise. * testsuite/22_locale/codecvt/always_noconv/char/1.cc: Likewise. * tests

[committed] libstdc++: Fix incorrect preprocessor conditions in

2022-03-29 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64le-linux, pushed to trunk. -- >8 -- The conditions that guard the feature test macros in should match the main definitions of the macros in other headers. This doesn't matter for GCC, because it supports all the conditions being tested here, but it does matter for non-GCC compil

[committed] libstdc++: Workaround for missing 'using enum' in Clang 12

2022-03-29 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64le-linux, pushed to trunk. -- >8 -- Once we no longer care about older compilers without this feature, we can drop these static data members, so the names don't have to be visible at class scope. libstdc++-v3/ChangeLog: * libsupc++/compare (_Strong_order) [!__cpp_using_e

Re: options, '-Wc++[...]-extensions': Remove undefined one-argument 'LangEnabledBy' option properties (was: [PATCH] c++: Add new warning options for C++ language mismatches)

2022-03-29 Thread Jonathan Wakely via Gcc-patches
t; > On Wed, May 19, 2021 at 05:39:24PM +0100, Jonathan Wakely via > >> > Gcc-patches wrote: > >> > > --- a/gcc/c-family/c.opt > >> > > +++ b/gcc/c-family/c.opt > > >> > > +Wc++11-extensions > >> > > +C++ ObjC++ Var(war

[PATCH] testsuite: Allow setting gpp_std_list in configuration files

2022-03-29 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64le-linux, OK for trunk? -- >8 -- This allows the gpp_std_list variable to be set in ~/.dejagnurc instead of using the GXX_TESTSUITE_STDS environment variable. This is consistent with how other defaults such as tool_timeout can be set. The environment variable can still be used t

[committed] testsuite: Disable tests for C++23 that depend on std::unexpected

2022-03-29 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64le-linux, pushed to trunk. -- >8 -- These tests depend on unexpected handlers, which are no longer declared for C++23 mode. Adjust the target specifier so they don't run. gcc/testsuite/ChangeLog: * g++.dg/cpp0x/noexcept06.C: Disable for C++23. libstdc++-v3/ChangeLog:

[committed] libstdc++: Add comment about memalign requirements

2022-03-31 Thread Jonathan Wakely via Gcc-patches
Pushed to trunk. -- >8 -- The memalign man page on Solaris and QNX lists an additional requirement for the alignment value that is not present in all implementation of that non-standard function. For both those targets we should actually be using posix_memalign anyway, so it doesn't matter. This

[PATCH] libstdc++: Implement std::unreachable() for C++23 (P0627R6)

2022-03-31 Thread Jonathan Wakely via Gcc-patches
This is a tiny C++23 feature that I plan to add for GCC 12. Does anybody have any comments on the choices below in terms of when to make reaching std::unreachable do an assert/trap/unreachable? My thoughts on avoiding the overhead in the _GLIBCXX_ASSERTIONS case is that this differs from e.g. asse

Re: [PATCH] libstdc++: Implement std::unreachable() for C++23 (P0627R6)

2022-03-31 Thread Jonathan Wakely via Gcc-patches
On Thu, 31 Mar 2022 at 16:51, Matthias Kretz via Libstdc++ wrote: > > I like it. But I'd like it even more if we could have > > #elif defined _UBSAN > __ubsan_invoke_ub("reached std::unreachable()"); > > But to my knowledge UBSAN has no hooks for the library like this (yet). As far as I know,

<    4   5   6   7   8   9   10   11   12   13   >