[committed] libstdc++: Add pretty printer for std::atomic

2022-04-27 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux, pushed to trunk. -- >8 -- For the atomic specializations for shared_ptr and weak_ptr we can reuse the existing SharedPointerPrinter, with a small tweak. libstdc++-v3/ChangeLog: * python/libstdcxx/v6/printers.py (SharedPointerPrinter): Add support for atomic>

Re: [PATCH] libstdc++: Update {x86_64, i?86, aarch64, s390x, ppc{, 64, 64le}} baseline_symbols.txt

2022-04-27 Thread Jonathan Wakely via Gcc-patches
On Wed, 27 Apr 2022 at 15:18, Jakub Jelinek wrote: > > Hi! > > The following patch updates baseline_symbols.txt on arches where I have > latest libstdc++ builds (my ws + Fedora package builds). > I've manually excluded: > +FUNC:_ZNKSt17__gnu_cxx_ieee1287num_getIcSt19istreambuf_iteratorIcSt11char_tr

Re: [PATCH][_GLIBCXX_INLINE_VERSION] Fix std::random_device definition

2022-04-28 Thread Jonathan Wakely via Gcc-patches
On Thu, 28 Apr 2022 at 05:56, François Dumont via Libstdc++ wrote: > > Hi > > Still time for this fix for gcc 12 ? What needs fixing? std::random_device is already declared in the versioned namespace in : namespace std _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_VERSION ... /

[PATCH] doc: Remove misleading text about multilibs for IEEE long double

2022-04-28 Thread Jonathan Wakely via Gcc-patches
IIUC this text is not true (maybe it was back in 2018?) OK for trunk? Which branches should it be on too, all of them? -- >8 -- The choice of ieee or ibm long double format is orthogonal to multilibs, as the two sets of symbols co-exist and don't need a separate multilib. gcc/ChangeLog:

[committed] libstdc++: Fix error reporting in filesystem::copy [PR99290]

2022-04-28 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux, pushed to trunk. I'll backport this too. -- >8 -- The recursive calls to filesystem::copy should stop if any of them reports an error. libstdc++-v3/ChangeLog: PR libstdc++/99290 * src/c++17/fs_ops.cc (fs::copy): Pass error_code to directory_iterator

[PATCH] libstdc++: Update documentation about copyright and GPL notices in tests

2022-04-28 Thread Jonathan Wakely via Gcc-patches
I intend to commit this patch soon. This isn't changing the policy, just adjusting the docs to match the current policy. I'm open to suggestions for better ways to phrase the second sentence, clarifying that our tests generally have nothing novel or "authored". -- >8 -- There is no need to requi

Re: [PATCH] libstdc++: Update documentation about copyright and GPL notices in tests

2022-04-28 Thread Jonathan Wakely via Gcc-patches
On Thu, 28 Apr 2022 at 17:45, Koning, Paul via Libstdc++ wrote: > > > > > On Apr 28, 2022, at 8:37 AM, Jonathan Wakely via Gcc-patches > > wrote: > > > > I intend to commit this patch soon. This isn't changing the policy, just > > adjusting the docs t

Re: [PATCH] libstdc++: Update Solaris baselines for GCC 12.1

2022-04-29 Thread Jonathan Wakely via Gcc-patches
On Thu, 28 Apr 2022 at 22:40, Rainer Orth wrote: > > The following patch updates the Solaris baselines for GCC 12.1. > > Tested on i386-pc-solaris2.11 and sparc-sun-solaris2.11 (Solaris 11.3 > and 11.4 in each case). > > The only (expected) difference between the 11.3 and 11.4 versions is > > --- b

[committed] libstdc++: Add missing exports for ppc64le --with-long-double-format=ibm [PR105417]

2022-04-29 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64le-linux (both long double ABIs, and also with old glibc) and x86_64-linux. Pushed to trunk, also needed for gcc-12 and gcc-11 branches. -- >8 -- The --with-long-double-abi=ibm build is missing some exports that are present in the --with-long-double-abi=ieee build. Those symbols

Re: [PATCH 2/2] libstdc++: Don't use std::tolower in [PR103911]

2022-05-01 Thread Jonathan Wakely via Gcc-patches
On Sun, 1 May 2022 at 19:21, Patrick Palka via Libstdc++ wrote: > > As in r12-6281-gc83ecfbe74a5cf for std::isdigit, shouldn't > use std::tolower either I think. > > Tested on x86_64-pc-linux-gnu, does this look OK for trunk/11 and the > 12 branch after it's thawed? OK, thanks. > > PR l

Re: [PATCH 1/2] libstdc++: case-sensitivity in hexfloat std::from_chars [PR105441]

2022-05-01 Thread Jonathan Wakely via Gcc-patches
On Sun, 1 May 2022 at 19:22, Patrick Palka via Libstdc++ wrote: > > The hexfloat parser for binary32/64 added in r12-6645-gcc3bf3404e4b1c > overlooked that the exponent part can also begin with an uppercase 'P'. > > Tested on x86_64-pc-linux-gnu, does this look OK for trunk/11, and possibly > the

Re: [PATCH] [PR105324] libstdc++: testsuite: pr105324 requires FP from_char

2022-05-03 Thread Jonathan Wakely via Gcc-patches
On Tue, 3 May 2022, 06:39 Alexandre Oliva via Libstdc++, < libstd...@gcc.gnu.org> wrote: > > The floating-point overloads of from_char are only declared if > _GLIBCXX_HAVE_USELOCALE is #defined as nonzero. That's exposed from > charconv as _cpp_lib_to_chars >= 201611L, so guard the test body with

Re: [PATCH v2] [PR105324] libstdc++: testsuite: pr105324 requires FP from_char

2022-05-03 Thread Jonathan Wakely via Gcc-patches
On Tue, 3 May 2022, 18:26 Alexandre Oliva, wrote: > On May 3, 2022, Jonathan Wakely wrote: > > > That macro should start with two underscores. > > Doh! Wow, eagle eyes! :-) Good catch, thanks! > > Here's the corrected patch I'm installing, trunk for now, 12 and 11 once > it's allowed in 12.

Re: [PATCH] libstdc++: fix pointer type exception catch [PR105387]

2022-05-04 Thread Jonathan Wakely via Gcc-patches
On Wed, 4 May 2022 at 12:14, Jonathan Wakely wrote: > > On Tue, 3 May 2022 at 11:57, Jakob Hasse via Libstdc++ > wrote: > > > > This is a patch for the bug 105387 reported in bugzilla: 105387 > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105387. This report should > > contain all the necessa

[committed] libstdc++: Fixes for tests that fail with -fno-rtti

2022-05-05 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux -frtti/-fno-rtti, pushed to trunk. -- >8 -- This disables a use of dynamic_cast that is not valid for -fno-rtti and adjusts some tests so they don't FAIL with -fno-rtti. Some tests are skipped completely, and others just make use of typeid conditional on the __cpp_rtti macro.

Re: [PATCH] libstdc++: Update documentation about copyright and GPL notices in tests

2022-05-06 Thread Jonathan Wakely via Gcc-patches
I've pushed this to trunk now. On Thu, 28 Apr 2022 at 18:02, Jonathan Wakely wrote: > > On Thu, 28 Apr 2022 at 17:45, Koning, Paul via Libstdc++ > wrote: > > > > > > > > > On Apr 28, 2022, at 8:37 AM, Jonathan Wakely via Gcc-patches > > > wro

[committed] libstdc++: Do not use #include inside push visibility scope [PR99871]

2022-05-06 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64le-linux, pushed to trunk. -- >8 -- libstdc++-v3/ChangeLog: PR libstdc++/99871 * include/bits/specfun.h: Use visibility attribute on namespace, instead of pragma push/pop. * libsupc++/compare: Likewise. * libsupc++/exception: Likewise.

[committed] libstdc++: Do not include in

2022-05-06 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64le-linux, pushed to trunk. -- >8 -- This avoids polluting the global namespace with the "abi" namespace alias. libstdc++-v3/ChangeLog: * include/std/stacktrace: Do not include . (__cxa_demangle): Declare. --- libstdc++-v3/include/std/stacktrace | 8 +++- 1 f

[committed] libstdc++: Fix test that fails on Solaris [PR104731]

2022-05-06 Thread Jonathan Wakely via Gcc-patches
On Solaris the dirent::d_name member is a single char, causing this test to fail with warnings about buffer overflow. Change the test to use a union with additional space for writing a string to the d_name member. libstdc++-v3/ChangeLog: PR libstdc++/104731 * testsuite/27_io/files

Re: [PATCH v2] libstdc++: ppc: conditionalize vsx-only simd intrinsics

2022-05-06 Thread Jonathan Wakely via Gcc-patches
On Fri, 6 May 2022 at 17:17, Segher Boessenkool wrote: > > +#if defined __VSX__ || __LONG_WIDTH__ == 32 > > _GLIBCXX_SIMD_PPC_INTRIN(signed long); > > _GLIBCXX_SIMD_PPC_INTRIN(unsigned long); > > +#endif > > Is __LONG_WIDTH__ the right macro to use here? Nothing else in > libstdc++v3 uses it. "

[committed 2/2] libstdc++: Simplify std::normal_distribution equality operator

2022-05-06 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64le-linux, pushed to trunk. -- >8 -- libstdc++-v3/ChangeLog: * include/bits/random.tcc (operator==): Only check normal_distribution::_M_saved_available once. * testsuite/26_numerics/random/normal_distribution/operators/equal.cc: Check equality after

[committed 1/2] libstdc++: Fix deserialization for std::normal_distribution [PR105502]

2022-05-06 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64le-linux, pushed to trunk. Backports to all branches needed. -- >8 -- This fixes a regression in std::normal_distribution deserialization that caused the object to be left unchanged if the __state_avail value read from the stream was false. libstdc++-v3/ChangeLog: PR lib

[committed 1/2] libstdc++: Add declarations to [PR105284]

2022-05-10 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64le-linux, pushed to trunk. -- >8 -- libstdc++-v3/ChangeLog: PR libstdc++/105284 * include/std/iosfwd: Add declarations for class templates and typedefs. * include/std/syncstream (basic_syncbuf, basic_osyncstream): Remove default template a

[committed 2/2] libstdc++: Add declarations to [PR105284]

2022-05-10 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64le-linux, pushed to trunk. -- >8 -- libstdc++-v3/ChangeLog: PR libstdc++/105284 * include/std/iosfwd: Add declarations for class templates and typedefs. * include/std/spanstream (basic_spanbuf, basic_ispanstream) (basic_ospanstream, basic_

Re: c++: Support module language-decl semantics

2022-05-12 Thread Jonathan Wakely via Gcc-patches
On Thu, 12 May 2022 at 12:18, Nathan Sidwell wrote: > > In modules purview, one can attach a declaration to the global module > (i.e. not the named module in whence the declaration appears), using a > language declaration: > >export module Foo; >extern "C++" void *operator new (std::size_t)

[committed] libstdc++: Remove whitespace before preprocessor directives

2022-05-12 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux, pushed to trunk. -- >8 -- These are harmless, but also unnecessary and inconsistent (and their removal was requested by PR libstdc++/17632). libstdc++-v3/ChangeLog: * config/locale/dragonfly/numeric_members.cc: Remove whitespace. * config/locale/gnu/numeric_

[committed 01/12] libstdc++: Disable Doxygen GROUP_NESTED_COMPOUNDS config option

2022-05-13 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64le-linux, pushed to trunk. -- >8 -- Before Doxygen version 1.9.2 this option is broken (see https://github.com/doxygen/doxygen/issues/8638 for more details) and classes are not added to the correct groups by @ingroup and @addtogroup. Also remove the obsolete CLASS_DIAGRAMS option

[committed 03/12] libstdc++: Add macros for the inline namespace std::_V2

2022-05-13 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64le-linux, pushed to trunk. Unlike the rest of the series, this isn't suitable for backporting because it changes the ABI for the gnu-versioned-namespace build. That's fine for GCC 13, but not OK to change within a release branch, e.g. between 12.1 and 12.2. If we want to backport i

[committed 04/12] libstdc++: Improve doxygen docs for std::pointer_traits

2022-05-13 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64le-linux, pushed to trunk. -- >8 -- libstdc++-v3/ChangeLog: * include/bits/ptr_traits.h: Add some doxygen comments. --- libstdc++-v3/include/bits/ptr_traits.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/libstdc++-v3/include/bits/ptr_traits.h b/libstdc++-v3

[committed 02/12] libstdc++: Fix typo in doxygen @headerfile command

2022-05-13 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64le-linux, pushed to trunk. -- >8 -- libstdc++-v3/ChangeLog: * include/bits/mofunc_impl.h: Fix doxygen command. --- libstdc++-v3/include/bits/mofunc_impl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libstdc++-v3/include/bits/mofunc_impl.h b/libst

[committed 07/12] libstdc++: Improve doxygen docs for

2022-05-13 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64le-linux, pushed to trunk. -- >8 -- Add @headerfile and @since tags. Improve grouping of non-member functions via @relates tags. Mark the std::pair base class of std::sub_match as undocumented, so that the docs don't show all the related non-member functions are part of the sub_m

[committed 08/12] libstdc++: Improve doxygen docs for std::allocator

2022-05-13 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64le-linux, pushed to trunk. -- >8 -- libstdc++-v3/ChangeLog: * doc/doxygen/user.cfg.in (PREDEFINED): Define __allocator_base so that Doxygen shows the right base-class for std::allocator. * include/bits/alloc_traits.h: Improve doxygen docs. * includ

[committed 05/12] libstdc++: Improve doxygen docs for

2022-05-13 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64le-linux, pushed to trunk. -- >8 -- libstdc++-v3/ChangeLog: * include/std/system_error: Improve doxygen comments. --- libstdc++-v3/include/std/system_error | 136 -- 1 file changed, 107 insertions(+), 29 deletions(-) diff --git a/libstdc++-v3/inc

[committed 10/12] libstdc++: Improve doxygen docs for and

2022-05-13 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64le-linux, pushed to trunk. -- >8 -- libstdc++-v3/ChangeLog: * include/bits/std_thread.h (thread, thread::id): Improve doxygen docs. * include/std/future: Likewise. * include/std/thread (jthread): Likewise. --- libstdc++-v3/include/bits/std_thread.

[committed 06/12] libstdc++: Improve doxygen docs for

2022-05-13 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64le-linux, pushed to trunk. -- >8 -- libstdc++-v3/ChangeLog: * include/std/atomic: Suppress doxygen docs for implementation details. * include/bits/atomic_base.h: Likewise. * include/bits/shared_ptr_atomic.h: Use markdown. Fix grouping so th

[committed 11/12] libstdc++: Improve doxygen docs for some of

2022-05-13 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64le-linux, pushed to trunk. -- >8 -- libstdc++-v3/ChangeLog: * doc/doxygen/user.cfg.in (PREDEFINED): Define _GLIBCXX23_CONSTEXPR macro. * include/backward/auto_ptr.h (auto_ptr): Use @deprecated. * include/bits/unique_ptr.h (default_delete): Use @sin

[committed 09/12] libstdc++: Improve doxygen docs for algorithms and more

2022-05-13 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64le-linux, pushed to trunk. -- >8 -- libstdc++-v3/ChangeLog: * include/bits/ostream_insert.h: Mark helper functions as undocumented by Doxygen. * include/bits/stl_algo.h: Use markdown for formatting and mark helper functions as undocumented.

[committed 12/12] libstdc++: Improve doxygen docs for

2022-05-13 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64le-linux, pushed to trunk. -- >8 -- libstdc++-v3/ChangeLog: * doc/doxygen/user.cfg.in (PREDEFINED): Define _GTHREAD_USE_MUTEX_TIMEDLOCK macro. * include/bits/std_mutex.h (mutex, lock_guard): Use @since and @headerfile. * include/bits/unique

[committed] libstdc++: Make std::rethrow_if_nested work without RTTI

2022-05-13 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64l4-linux, pushed to trunk. -- >8 -- This allows std::rethrow_if_nested to work with -fno-rtti by not attempting the dynamic_cast if it requires RTTI, since that's ill-formed with -fno-rtti. The cast will still work if a static upcast to std::nested_exception is allowed. Also use

[committed] libstdc++: Allow std::swap to find overload for std::exception_ptr

2022-05-13 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64l4-linux, pushed to trunk. -- >8 -- The non-member swap for std::exception_ptr is in a nested namespace and so can only be found by ADL currently. Add a using-declaration so that qualified std::swap calls will use the std::exception_ptr::swap member, instead of the generic std::sw

[committed] libstdc++: Add noexcept to std::launch operators

2022-05-13 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64l4-linux, pushed to trunk. -- >8 -- libstdc++-v3/ChangeLog: * include/std/future (launch): Make operators noexcept. --- libstdc++-v3/include/std/future | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/libstdc++-v3/include/std/future b/li

[committed] libstdc++: Make std::thread::_State private

2022-05-13 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64l4-linux, pushed to trunk. -- >8 -- * include/bits/std_thread.h (thread::_State, thread::_State_ptr): Declare as private unless _GLIBCXX_THREAD_IMPL is defined. * src/c++11/thread.cc (_GLIBCXX_THREAD_IMPL): Define. --- libstdc++-v3/include/bits/std_thread.

[committed 1/4] libstdc++: Fix status docs for support

2022-05-16 Thread Jonathan Wakely via Gcc-patches
Pushed to trunk. Backports to all branches needed. -- >8 -- libstdc++-v3/ChangeLog: * doc/html/manual/status.html: Regenerate. * doc/xml/manual/status_cxx2020.xml: Fix supported version for C++20 bit operations. --- libstdc++-v3/doc/html/manual/status.html | 2 +-

[committed 2/4] libstdc++: Add C++23 status docs

2022-05-16 Thread Jonathan Wakely via Gcc-patches
Pushed to trunk. Backports to gcc-11 and gcc-12 to follow. -- >8 -- These are the C++23 proposals already supported in the gcc-11 branch. libstdc++-v3/ChangeLog: * doc/xml/manual/intro.xml: Include new chapter. * doc/xml/manual/status_cxx2020.xml: Tweak release numbers.

[committed 4/4] libstdc++: Fix hyperlink in docs

2022-05-16 Thread Jonathan Wakely via Gcc-patches
Pushed to trunk. Backports to follow. -- >8 -- libstdc++-v3/ChangeLog: * doc/xml/manual/prerequisites.xml: Fix attributes for external hyperlink. * doc/html/manual/setup.html: Regenerate. --- libstdc++-v3/doc/html/manual/setup.html | 2 +- libstdc++-v3/doc/xml/manu

[committed 3/4] libstdc++: Update C++23 status docs

2022-05-16 Thread Jonathan Wakely via Gcc-patches
Pushed to trunk. Backport to gcc-12 to follow. -- >8 -- These are the C++23 proposals supported in the gcc-12 branch. libstdc++-v3/ChangeLog: * doc/xml/manual/status_cxx2023.xml: Update with gcc-12 support. * doc/html/*: Regenerate. --- libstdc++-v3/doc/html/manual/status.html

Re: [committed 3/4] libstdc++: Update C++23 status docs

2022-05-16 Thread Jonathan Wakely via Gcc-patches
This documents the partial support for P2231 in the gcc-11 branch, pushed to that branch. commit 5d418194ccb39346d2ad022c5b143fe00b2340ac Author: Jonathan Wakely Date: Mon May 16 15:33:06 2022 libstdc++: Document support for constexpr optional (P2231R1) The changes for std::variant

[committed] libstdc++: Stop defining C++0x compat symbols for versioned namespace

2022-05-17 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux, --enable-symvers=gnu and --enable-symvers=gnu-versioned-namespace. Pushed to trunk. -- >8 -- The src/c++11/compatibility*-c++0x.cc files define symbols that need to be exported for ancient versions of libstdc++.so.6 due to changes between C++0x and the final C++11 standard.

[committed] libstdc++: Skip tests that fail for the versioned namespace

2022-05-17 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux, pushed to trunk. -- >8 -- Most tests for the contents of header synopses need to be supressed for the versioned namespace build, because redeclaring the entities in std fails when they were originally declared in std::__8. I added these tests recently without the suppression

[committed] libstdc++: Add attributes to and related

2022-05-17 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64le-linux, pushed to trunk. -- >8 -- Add the const attribute to std::future_category() and std::iostream_category(), to match the existing attributes on std::generic_category() and std::system_category(). Also add [[nodiscard]] to those functions and to the comparison operators fo

[committed] libstdc++: Add attributes to functions in

2022-05-17 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64le-linux, pushed to trunk. -- >8 -- Add attributes to the accessors for the global memory resource objects, to allow the compiler to eliminate redundant calls to them. For example, multiple calls to std::pmr::new_delete_resource() will always return the same object, and so the com

[committed] libstdc++: Relax memory ordering for default memory resource object

2022-05-17 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64le-linux, pushed to trunk. -- >8 -- Currently pmr::set_default_resource and pmr::get_default_resource both use sequentially consistent memory ordering. This is overkill. The standard only requires that a call to set_default_resource synchronizes with subsequent calls to set_defaul

[committed] libstdc++: Implement LWG 3683 for pmr::polymorphic_allocator

2022-05-19 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux, pushed to trunk. -- >8 -- This issue has recently been moved to Tentatively Ready, and seems uncontroversial. This allows equality comparison with types that are convertible to pmr::polymorphic_allocator, which fail deduction for the existing equality operator. libstdc++-v3/

[committed] libstdc++: Ensure pmr aliases work without

2022-05-19 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64le-linux, pushed to trunk. This adds a lot more code to every container header, which is unfortunate. I plan to replace the inclusion of in the header with something smaller that just defines std:tuple, and not all the helpers like std::make_tuple. -- >8 -- Currently the alias

[committed] libstdc++: Only include for COW string

2022-05-19 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64le-linux, pushed to trunk. -- >8 -- Since the COW std::string was moved to its own header, we don't need the atomic dispatch helpers in the definition of std::__cxx11::string. Move the inclusion of the header to where it's needed. libstdc++-v3/ChangeLog: * include/bits

[committed] libstdc++: Avoid including for std::char_traits

2022-05-19 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64le-linux, pushed to trunk. -- >8 -- We should prefer the __UINT_LEAST16_TYPE__ and __UINT_LEAST32_TYPE__ macros, if available, so that we don't need all of in every header that uses std::char_traits. libstdc++-v3/ChangeLog: * include/bits/char_traits.h: Only include wh

Re: [PATCH] libstdc++-v3: Set 26_numerics/random/n.b.d./op./values.cc timeout-factor to 3

2022-05-20 Thread Jonathan Wakely via Gcc-patches
On Fri, 20 May 2022 at 03:20, Hans-Peter Nilsson via Libstdc++ wrote: > > Also, how about shortening those test-suite file-paths? > They're path sort-of overlong for any git (and ChangeLog) > commit-line limit. 1/2 :-) Yes, they're silly. I like what libc++ does, i.e. name the testsuite directori

Re: [PATCH] libstdc++-v3: Set 26_numerics/random/n.b.d./op./values.cc timeout-factor to 3

2022-05-20 Thread Jonathan Wakely via Gcc-patches
On Fri, 20 May 2022 at 10:03, Jonathan Wakely wrote: > > On Fri, 20 May 2022 at 03:20, Hans-Peter Nilsson via Libstdc++ > wrote: > > > > Also, how about shortening those test-suite file-paths? > > They're path sort-of overlong for any git (and ChangeLog) > > commit-line limit. 1/2 :-) > > Yes, th

Re: [PATCH] libstdc++-v3: Set 26_numerics/random/n.b.d./op./values.cc timeout-factor to 3

2022-05-20 Thread Jonathan Wakely via Gcc-patches
On Fri, 20 May 2022 at 15:31, Hans-Peter Nilsson wrote: > > > From: Jonathan Wakely > > Date: Fri, 20 May 2022 11:03:40 +0200 > > > > Ok to commit (without renaming)? > > > > I'm OK with the timeout factor, but we could also solve it differently > > so that it doesn't take nearly 5 minutes, as in

Re: [PATCH][_Hashtable] Fix insertion of range of type convertible to value_type PR 56112

2022-05-24 Thread Jonathan Wakely via Gcc-patches
On Thu, 5 May 2022 at 18:38, François Dumont via Libstdc++ wrote: > > Hi > > Renewing my patch to fix PR 56112 but for the insert methods, I totally > change it, now works also with move-only key types. > > I let you Jonathan find a better name than _ValueTypeEnforcer as usual :-) > > libstdc++: [

Re: [PATCH][_Hashtable] Fix insertion of range of type convertible to value_type PR 56112

2022-05-24 Thread Jonathan Wakely via Gcc-patches
On Tue, 24 May 2022 at 11:18, Jonathan Wakely wrote: > > On Thu, 5 May 2022 at 18:38, François Dumont via Libstdc++ > wrote: > > > > Hi > > > > Renewing my patch to fix PR 56112 but for the insert methods, I totally > > change it, now works also with move-only key types. > > > > I let you Jonathan

Re: [PATCH][_Hashtable] Fix insertion of range of type convertible to value_type PR 56112

2022-05-24 Thread Jonathan Wakely via Gcc-patches
On Tue, 24 May 2022 at 11:22, Jonathan Wakely wrote: > > On Tue, 24 May 2022 at 11:18, Jonathan Wakely wrote: > > > > On Thu, 5 May 2022 at 18:38, François Dumont via Libstdc++ > > wrote: > > > > > > Hi > > > > > > Renewing my patch to fix PR 56112 but for the insert methods, I totally > > > chang

[wwwdocs] Document changes in libstdc++

2022-05-24 Thread Jonathan Wakely via Gcc-patches
Pushed to wwwdocs. commit f55f35c86c68143a2b148c66e4b0b560c852ce6f Author: Jonathan Wakely Date: Tue May 24 13:06:11 2022 +0100 Document changes in libstdc++ diff --git a/htdocs/gcc-13/porting_to.html b/htdocs/gcc-13/porting_to.html index b3e0895a..84a00f21 100644 --- a/htdocs/gcc-13/port

Re: [PATCH] Add missing gnu-versioned-namespace symbols

2020-11-02 Thread Jonathan Wakely via Gcc-patches
On 01/11/20 20:48 +0100, François Dumont via Libstdc++ wrote: Several tests are failing because of those missing symbols. I understand why we need to export symbols relying in the versioned namespace but I don't understand why we need to do it for _GLIBCXX_DEBUG symbols which are not version

Re: [PATCH] libstdc++: Add c++2a

2020-11-02 Thread Jonathan Wakely via Gcc-patches
On 02/11/20 08:10 -0800, Thomas Rodgers wrote: From: Thomas Rodgers IGNORE the previous patch. Changes implementation to use a private __mutex type as discussed on IRC. libstdc++/ChangeLog: libstdc++-v3/doc/doxygen/user.cfg.in (INPUT): Add new header. libstdc++-v3/include/Make

Re: [PATCH] libstdc++: use lt_host_flags for libstdc++.la

2020-11-03 Thread Jonathan Wakely via Gcc-patches
On 16/09/20 13:16 +, JonY via Libstdc++ wrote: For platforms like Mingw and Cygwin, cygwin refuses to generate the shared library without using -no-undefined. Attached patch makes sure the right flags are used, since libtool is already used to link libstdc++. Patch OK? I've pushed it to t

Re: [PATCH] Add missing gnu-versioned-namespace symbols

2020-11-03 Thread Jonathan Wakely via Gcc-patches
On 02/11/20 21:52 +0100, François Dumont via Libstdc++ wrote: On 02/11/20 3:17 pm, Jonathan Wakely wrote: On 01/11/20 20:48 +0100, François Dumont via Libstdc++ wrote: Several tests are failing because of those missing symbols. I understand why we need to export symbols relying in the ver

[committed] libstdc++: Rewrite std::call_once to use futexes [PR 66146]

2020-11-03 Thread Jonathan Wakely via Gcc-patches
The current implementation of std::call_once uses pthread_once, which only meets the C++ requirements when compiled with support for exceptions. For most glibc targets and all non-glibc targets, pthread_once does not work correctly if the init_routine exits via an exception. The pthread_once_t obje

Re: [committed] libstdc++: Rewrite std::call_once to use futexes [PR 66146]

2020-11-03 Thread Jonathan Wakely via Gcc-patches
This is a minor refactoring for readability. Tested x86_64-linux and powerpc-aix. Committed to trunk. commit 9f925f3b198e210e0d124a3c69fae034f429942f Author: Jonathan Wakely Date: Tue Nov 3 19:42:07 2020 libstdc++: Refactor std::call_once internals This separates the definition

Re: [committed] libstdc++: Rewrite std::call_once to use futexes [PR 66146]

2020-11-03 Thread Jonathan Wakely via Gcc-patches
On 03/11/20 18:45 +, Jonathan Wakely wrote: The current implementation of std::call_once uses pthread_once, which only meets the C++ requirements when compiled with support for exceptions. For most glibc targets and all non-glibc targets, pthread_once does not work correctly if the init_routi

Re: [PATCH] libstdc++: Add c++2a

2020-11-03 Thread Jonathan Wakely via Gcc-patches
On 03/11/20 22:22 +0100, Christophe Lyon via Libstdc++ wrote: On Mon, 2 Nov 2020 at 19:43, Thomas Rodgers via Gcc-patches wrote: Testsed x86_64-pc-linux-gnu, committed to master. Hi, I can see the new tests failing on bare-metal targets using newlib (arm-eabi, aarch64-elf): 27_io/basic

Re: [committed] libstdc++: Allow Lemire's algorithm to be used in more cases

2020-11-03 Thread Jonathan Wakely via Gcc-patches
On 03/11/20 22:28 +0100, Stephan Bergmann via Libstdc++ wrote: On 29/10/2020 15:59, Jonathan Wakely via Gcc-patches wrote: This extends the fast path to also work when the URBG's range of possible values is not the entire range of its result_type. Previously, the slow path would be use

Re: [committed] libstdc++: Allow Lemire's algorithm to be used in more cases

2020-11-04 Thread Jonathan Wakely via Gcc-patches
On 04/11/20 09:45 +0100, Stephan Bergmann via Libstdc++ wrote: On 03/11/2020 23:25, Jonathan Wakely wrote: On 03/11/20 22:28 +0100, Stephan Bergmann via Libstdc++ wrote: On 29/10/2020 15:59, Jonathan Wakely via Gcc-patches wrote: This extends the fast path to also work when the URBG's

Re: [committed] libstdc++: Allow Lemire's algorithm to be used in more cases

2020-11-04 Thread Jonathan Wakely via Gcc-patches
On 04/11/20 10:15 +, Jonathan Wakely wrote: On 04/11/20 09:45 +0100, Stephan Bergmann via Libstdc++ wrote: On 03/11/2020 23:25, Jonathan Wakely wrote: On 03/11/20 22:28 +0100, Stephan Bergmann via Libstdc++ wrote: On 29/10/2020 15:59, Jonathan Wakely via Gcc-patches wrote: This extends

[committed] libstdc++: Document istreambuf_iterator base class change [PR 92285]

2020-11-04 Thread Jonathan Wakely via Gcc-patches
libstdc++-v3/ChangeLog: PR libstdc++/92285 * doc/xml/manual/evolution.xml: Document change to base class. * doc/html/manual/api.html: Regenerate. Tested powerpc64le-linux. Committed to trunk. commit 3ef33e756a65484a17abb95ef0d4133f80c014b1 Author: Jonathan Wakely Date:

[wwwdocs] Document std::istreambuf_iterator change in GCC 10 [PR 92285]

2020-11-04 Thread Jonathan Wakely via Gcc-patches
I'm adding this caveat to the gcc-10 release notes, as well as to the libstdc++ manual. Pushed to wwwdocs. commit 6ffde10eba0811d1223eaba7e2a8daefe26276aa Author: Jonathan Wakely Date: Wed Nov 4 12:58:19 2020 + Document std::istreambuf_iterator change in GCC 10 [PR 92285] diff --git

[committed] libstdc++: Define new C++17 std::search overload for Parallel Mode [PR 94971]

2020-11-04 Thread Jonathan Wakely via Gcc-patches
libstdc++-v3/ChangeLog: PR libstdc++/94971 * include/bits/stl_algo.h (search(FIter, FIter, const Searcher): Adjust #if condition. * include/parallel/algo.h (search(FIter, FIter, const Searcher&): Define new overload for C++17. Tested powerpc64le-linux. Comm

[committed] libstdc++: Fix test failure with --disable-linux-futex

2020-11-04 Thread Jonathan Wakely via Gcc-patches
As noted in PR 96817 this new test fails if the library is built without futexes. That's expected of course, but we might as well fail more obviously than a deadlock that eventually times out. libstdc++-v3/ChangeLog: * testsuite/18_support/96817.cc: Fail fail if the library is con

Re: [PATCH] libstdc++: Add support for C++20 barriers

2020-11-04 Thread Jonathan Wakely via Gcc-patches
On 04/11/20 09:29 -0800, Thomas Rodgers wrote: From: Thomas Rodgers Adds libstdc++/ChangeLog: * include/Makefile.am (std_headers): Add new header. * include/Makefile.in: Regenerate. * include/std/barrier: New file. * testsuite/30_thread/barrier/1.cc: New test.

Re: [PATCH] libstdc++: Add support for C++20 barriers

2020-11-04 Thread Jonathan Wakely via Gcc-patches
On 04/11/20 10:41 -0800, Thomas Rodgers wrote: From: Thomas Rodgers IGNORE the previous version of this patch please. OK, but all my comments seem to apply to this one too. Adds libstdc++/ChangeLog: * include/Makefile.am (std_headers): Add new header. * include/Makefile.i

Re: [PATCH] libstdc++: Implement C++20 features for

2020-11-04 Thread Jonathan Wakely via Gcc-patches
On 04/11/20 12:43 -0800, Thomas Rodgers wrote: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97719 On Nov 4, 2020, at 11:54 AM, Stephan Bergmann wrote: On 07/10/2020 18:55, Thomas Rodgers wrote: From: Thomas Rodgers New ctors and ::view() accessor for - * basic_stingbuf * basic_istringst

Re: [PATCH] libstdc++: Implement C++20 features for

2020-11-04 Thread Jonathan Wakely via Gcc-patches
On 04/11/20 21:45 +, Jonathan Wakely wrote: On 04/11/20 12:43 -0800, Thomas Rodgers wrote: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97719 On Nov 4, 2020, at 11:54 AM, Stephan Bergmann wrote: On 07/10/2020 18:55, Thomas Rodgers wrote: From: Thomas Rodgers New ctors and ::view() acce

Re: [PATCH] libstdc++: Implement C++20 features for

2020-11-05 Thread Jonathan Wakely via Gcc-patches
On 04/11/20 23:41 +, Jonathan Wakely wrote: On 04/11/20 21:45 +, Jonathan Wakely wrote: On 04/11/20 12:43 -0800, Thomas Rodgers wrote: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97719 On Nov 4, 2020, at 11:54 AM, Stephan Bergmann wrote: On 07/10/2020 18:55, Thomas Rodgers wrote:

[committed 1/2] libstdc++: Export basic_stringbuf constructor [PR 97729]

2020-11-05 Thread Jonathan Wakely via Gcc-patches
libstdc++-v3/ChangeLog: PR libstdc++/97729 * config/abi/pre/gnu.ver (GLIBCXX_3.4.29): Add exports. * src/c++20/sstream-inst.cc (basic_stringbuf): Instantiate private constructor taking __xfer_bufptrs. Tested powerpc64le-linux. Committed to trunk. commit 50b840ac5e

[committed] libstdc++: Use non-throwing increment in recursive_directory_iterator [PR 97731]

2020-11-05 Thread Jonathan Wakely via Gcc-patches
As described in the PR, the recursive_directory_iterator constructor calls advance(ec), but ec is a pointer so it calls _Dir::advance(bool). The intention was to either call advance() or advance(*ec) depending whether the pointer is null or not. This fixes the bug and renames the parameter to ecpt

Re: [committed 1/2] libstdc++: Fix multiple definitions of std::exception_ptr functions [PR 97729]

2020-11-05 Thread Jonathan Wakely via Gcc-patches
This fixes some multiple definition errors caused by the changes for PR libstdc++/90295. The previous solution for inlining the members of std::exception_ptr but still exporting them from the library was to suppress the 'inline' keyword on those functions when compiling libsupc++/eh_ptr.cc, so the

[committed] libstdc++: Fix constraints on std::optional comparisons [PR 96269]

2020-11-05 Thread Jonathan Wakely via Gcc-patches
The relational operators for std::optional were using the wrong types in the declval expressions used to constrain them. Instead of using const lvalues they were using non-const rvalues, which meant that a type might satisfy the constraints but then give an error when the function body was instanti

Re: [committed] libstdc++: Fix constraints on std::optional comparisons [PR 96269]

2020-11-05 Thread Jonathan Wakely via Gcc-patches
On 05/11/20 19:09 +, Jonathan Wakely wrote: The relational operators for std::optional were using the wrong types in the declval expressions used to constrain them. Instead of using const lvalues they were using non-const rvalues, which meant that a type might satisfy the constraints but then

Re: [committed] libstdc++: Fix constraints on std::optional comparisons [PR 96269]

2020-11-05 Thread Jonathan Wakely via Gcc-patches
On 05/11/20 22:12 +0200, Ville Voutilainen via Libstdc++ wrote: On Thu, 5 Nov 2020 at 21:52, Jonathan Wakely via Libstdc++ wrote: On 05/11/20 19:09 +, Jonathan Wakely wrote: >The relational operators for std::optional were using the wrong types >in the declval expressions used to constrain

Re: [committed 1/2] libstdc++: Export basic_stringbuf constructor [PR 97729]

2020-11-06 Thread Jonathan Wakely via Gcc-patches
On 06/11/20 11:56 +0100, Rainer Orth wrote: Hi Jonathan, libstdc++-v3/ChangeLog: PR libstdc++/97729 * config/abi/pre/gnu.ver (GLIBCXX_3.4.29): Add exports. * src/c++20/sstream-inst.cc (basic_stringbuf): Instantiate private constructor taking __xfer_bufptrs. Tes

Re: [PATCH] 1/2 Make _GLIBCXX_DEBUG checks constexpr compatible

2020-11-09 Thread Jonathan Wakely via Gcc-patches
On 08/11/20 15:06 +0100, François Dumont via Libstdc++ wrote: Now that __glibcxx_assert is constexpr compatible we can do the same for the _GLIBCXX_DEBUG equivalent. I had also try to do the same on my own so this patch contains the string_view tests I had written when doing so. I plan to a

Re: [PATCH] 2/2 Remove debug/array

2020-11-09 Thread Jonathan Wakely via Gcc-patches
On 08/11/20 15:27 +0100, François Dumont via Libstdc++ wrote: Following a recent fix on std::array this test started to fail in _GLIBCXX_DEBUG mode. FAIL: 23_containers/array/comparison_operators/96851.cc (test for excess errors) Rather than fixing it and now that __glibcxx_assert is conste

Re: [committed] libstdc++: Make std::function work better with -fno-rtti

2020-11-09 Thread Jonathan Wakely via Gcc-patches
On 29/10/20 14:49 +, Jonathan Wakely wrote: This change allows std::function::target() to work even without RTTI, using the same approach as std::any. Because we know what the manager function would be for a given type, we can check if the stored pointer has the expected address. If it does,

Re: [committed 1/2] libstdc++: Fix multiple definitions of std::exception_ptr functions [PR 97729]

2020-11-09 Thread Jonathan Wakely via Gcc-patches
On 05/11/20 18:03 +, Jonathan Wakely wrote: This fixes some multiple definition errors caused by the changes for PR libstdc++/90295. The previous solution for inlining the members of std::exception_ptr but still exporting them from the library was to suppress the 'inline' keyword on those fun

[committed] libstdc++: Remove redundant check for zero in std::__popcount

2020-11-09 Thread Jonathan Wakely via Gcc-patches
The popcount built-ins work fine for zero, so there's no need to check for it. libstdc++-v3/ChangeLog: * include/std/bit (__popcount): Remove redundant check for zero. Tested x86_64-linux. Committed to trunk. commit ff4bfb1553cf525d7299bbf7451ac32cfd97ae1b Author: Jonathan Wakely Date:

[committed] libstdc++: Improve comment on _Power_of_2 helper function

2020-11-09 Thread Jonathan Wakely via Gcc-patches
libstdc++-v3/ChangeLog: * include/bits/uniform_int_dist.h (__detail::_Power_of_2): Document that true result for zero is intentional. Tested x86_64-linux. Committed to trunk. commit b2b85163731e8647542f2f7561bd4c69ae5f5f2a Author: Jonathan Wakely Date: Mon Nov 9 14:32:45 2020

[committed] libstdc++: Reorder constructors in

2020-11-10 Thread Jonathan Wakely via Gcc-patches
This groups all the constructors together, consistent with the synopses in the C++20 standard. libstdc++-v3/ChangeLog: * include/std/sstream (basic_stringbug, basic_istringstream) (basic_ostringstream, basic_stringstream): Reorder C++20 constructors to be declared next to

[committed] libstdc++: Fix more unspecified comparisons to null pointer [PR 97415]

2020-11-10 Thread Jonathan Wakely via Gcc-patches
This adds some more null checks to avoid a relational comparison with a null pointer, similar to 78198b6021a9695054dab039340202170b88423c. libstdc++-v3/ChangeLog: PR libstdc++/97415 * include/std/sstream (basic_stringbuf::_M_update_egptr) (basic_stringbuf::__xfer_bufptrs::

[committed] libstdc++: Add remaining C++20 additions to [P0408R7]

2020-11-10 Thread Jonathan Wakely via Gcc-patches
This adds the new overloads of basic_stringbuf::str, and the corresponding overloads to basic_istringstream, basic_ostringstream and basic_stringstream. libstdc++-v3/ChangeLog: * config/abi/pre/gnu.ver (GLIBCXX_3.4.21): Tighten patterns. (GLIBCXX_3.4.29): Export new symbols.

[committed] libstdc++: Avoid bad_alloc exceptions when changing locales

2020-11-10 Thread Jonathan Wakely via Gcc-patches
For the --enable-clocale=generic configuration, the current code can fail with a bad_alloc exception. This patch uses the nothrow version of operator new and reports allocation failures by setting failbit in the iostate variable. * config/locale/generic/c_locale.cc (__set_C_locale()): New

<    9   10   11   12   13   14   15   16   17   18   >