Fix gnu versioned namespace mode 00/03

2024-05-04 Thread François Dumont
Here is the list of patches to restore gnu versioned namespace mode. 1/3: Bump gnu version namespace This is important to be done first so that once build of gnu versioned namespace is fixed there is no chance to have another build of '__8' version with a different abi than last successful '__

Fix gnu versioned namespace mode 01/03

2024-05-04 Thread François Dumont
libstdc++: Bump gnu versioned namespace to __9 libstdc++-v3/ChangeLog:     * acinclude.m4 (libtool_VERSION): Bump to 9:0:0.     * config/abi/pre/gnu-versioned-namespace.ver (GLIBCXX_8.0): Replace by GLIBCXX_9.0.     Adapt all references to __8 namespace.     * c

Fix gnu versioned namespace mode 03/03

2024-05-04 Thread François Dumont
    libstdc++: Review configuration options to control abi     --disable-libstdcxx-dual-abi default to 'new' abi mode.     --with-default-libstdcxx-abi consider the requested abi mode regardless     of --disable-libstdcxx-dual-abi usage.     libstdc++-v3/ChangeLog     * acinclude.m4 (G

Fix gnu versioned namespace mode 02/03

2024-05-04 Thread François Dumont
    libstdc++: [_GLIBCXX_INLINE_VERSION] Use cxx11 abi [PR83077]     Use cxx11 abi when activating versioned namespace mode. To do so support a new     configuration mode where !_GLIBCXX_USE_DUAL_ABI and _GLIBCXX_USE_CXX11_ABI.     The main change is that std::__cow_string is now defined when

[PATCH][_Hashtable] Fix some implementation inconsistencies

2024-05-12 Thread François Dumont
    libstdc++: [_Hashtable] Fix some implementation inconsistencies     Get rid of the different usages of the mutable keyword except in     _Prime_rehash_policy where it is preserved for abi compatibility reason.     Fix comment to explain that we need the computation of bucket index noexcep

Re: Fix gnu versioned namespace mode 00/03

2024-05-12 Thread François Dumont
On 07/05/2024 18:15, Iain Sandoe wrote: Hi François On 4 May 2024, at 22:11, François Dumont wrote: Here is the list of patches to restore gnu versioned namespace mode. 1/3: Bump gnu version namespace This is important to be done first so that once build of gnu versioned namespace is

Re: Fix gnu versioned namespace mode 00/03

2024-05-15 Thread François Dumont
On 13/05/2024 10:34, Jonathan Wakely wrote: On Mon, 13 May 2024, 07:30 Iain Sandoe, wrote: > On 13 May 2024, at 06:06, François Dumont wrote: > > > On 07/05/2024 18:15, Iain Sandoe wrote: >> Hi François >> >>> On 4 Ma

Re: [PATCH][_Hashtable] Fix some implementation inconsistencies

2024-05-21 Thread François Dumont
Ping ? On 13/05/2024 06:33, François Dumont wrote: libstdc++: [_Hashtable] Fix some implementation inconsistencies     Get rid of the different usages of the mutable keyword except in     _Prime_rehash_policy where it is preserved for abi compatibility reason.     Fix comment to explain

[PATCH] Fix coroutine tests for libstdc++ gnu-version-namespace mode

2023-09-23 Thread François Dumont
I'm eventually fixing those tests the same way we manage this problem in libstdc++ testsuite.    testsuite: Add optional libstdc++ version namespace in expected diagnostic     When libstdc++ is build with --enable-symvers=gnu-versioned-namespace diagnostics are     showing this namespace, c

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

2023-09-26 Thread François Dumont
Still no chance to get feedback from TC ? Maybe I can commit the below then ? AFAICS on gcc mailing list several gcc releases were done recently, too late. On 14/09/2023 06:46, François Dumont wrote: Author: TC Date:   Wed Sep 6 19:31:55 2023 +0200     libstdc++: Force

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

2023-09-28 Thread François Dumont
On 28/09/2023 18:18, Jonathan Wakely wrote: On Wed, 27 Sept 2023 at 05:44, François Dumont wrote: Still no chance to get feedback from TC ? Maybe I can commit the below then ? I've heard back from Tim now. Please use "Tim Song " as the author. You can change the commit

Re: [PATCH] Fix coroutine tests for libstdc++ gnu-version-namespace mode

2023-10-02 Thread François Dumont
Hi Gentle reminder for this minor patch. Thanks On 23/09/2023 22:10, François Dumont wrote: I'm eventually fixing those tests the same way we manage this problem in libstdc++ testsuite.    testsuite: Add optional libstdc++ version namespace in expected diagnostic     When libstdc

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

2023-10-02 Thread François Dumont
Now backport to gcc-11/12/13 branches. On 29/09/2023 11:53, Jonathan Wakely wrote: On Thu, 28 Sept 2023 at 18:25, François Dumont wrote: On 28/09/2023 18:18, Jonathan Wakely wrote: On Wed, 27 Sept 2023 at 05:44, François Dumont wrote: Still no chance to get feedback from TC ? Maybe I can

Re: [PATCH] Fix coroutine tests for libstdc++ gnu-version-namespace mode

2023-10-03 Thread François Dumont
Indeed ! Here is the right one. On 03/10/2023 11:52, Jonathan Wakely wrote: On Mon, 2 Oct 2023 at 18:07, François Dumont wrote: Hi Gentle reminder for this minor patch. It looks like you attached the wrong patch. Thanks On 23/09/2023 22:10, François Dumont wrote: I'm eventually f

[PATCH][_GLIBCXX_INLINE_VERSION] Add missing symbols

2023-10-05 Thread François Dumont
Here is a patch to fix following test case in gcc: gcc/testsuite/g++.dg/cpp23/ext-floating13.C     libstdc++: [_GLIBCXX_INLINE_VERSION] Add missing float symbols     libstdc++-v3/ChangeLog:     * config/abi/pre/gnu-versioned-namespace.ver: Add missing symbols     for _Float{1

Re: [PATCH] sso-string@gnu-versioned-namespace [PR83077]

2023-10-07 Thread François Dumont
Remove.     * src/c++98/compatibility.cc [_GLIBCXX_USE_CXX11_ABI]: Skip all definitions appart from     istream::ignore(streamsize). Tested under Linux x64_86, ok to commit ? François On 17/08/2023 19:22, Jonathan Wakely wrote: On Sun, 13 Aug 2023 at 14:27, François Dumont via

Re: [PATCH] sso-string@gnu-versioned-namespace [PR83077]

2023-10-07 Thread François Dumont
I've been told that previous patch generated with 'git diff -b' was not applying properly so here is the same patch again with a simple 'git diff'. On 07/10/2023 14:25, François Dumont wrote: Hi Here is a rebased version of this patch. There are few test failures w

Re: [PATCH][_GLIBCXX_INLINE_VERSION] Fix

2023-10-08 Thread François Dumont
, at 05:41, François Dumont wrote: Tests were successful, ok to commit ? On 20/09/2023 19:51, François Dumont wrote: libstdc++: [_GLIBCXX_INLINE_VERSION] Add handle_contract_violation symbol alias libstdc++-v3/ChangeLog: * src/experimental/contract.cc [_GLIBCXX_INLI

Re: [PATCH] sso-string@gnu-versioned-namespace [PR83077]

2023-10-09 Thread François Dumont
On 09/10/2023 16:42, Iain Sandoe wrote: Hi François, On 7 Oct 2023, at 20:32, François Dumont wrote: I've been told that previous patch generated with 'git diff -b' was not applying properly so here is the same patch again with a simple 'git diff'. Thanks, th

Re: [PATCH] Fix coroutine tests for libstdc++ gnu-version-namespace mode

2023-10-10 Thread François Dumont
On 08/10/2023 15:59, Iain Sandoe wrote: Hi François, On 23 Sep 2023, at 21:10, François Dumont wrote: I'm eventually fixing those tests the same way we manage this problem in libstdc++ testsuite. testsuite: Add optional libstdc++ version namespace in expected diagnostic

Re: [PATCH] Fix coroutine tests for libstdc++ gnu-version-namespace mode

2023-10-11 Thread François Dumont
Hi Iain On 11/10/2023 09:30, Iain Sandoe wrote: Hi François, On 11 Oct 2023, at 05:49, François Dumont wrote: On 08/10/2023 15:59, Iain Sandoe wrote: On 23 Sep 2023, at 21:10, François Dumont wrote: I'm eventually fixing those tests the same way we manage this problem in li

Re: [PATCH][_Hashtable] Avoid redundant usage of rehash policy

2023-10-12 Thread François Dumont
Now that abi breakage is fixed and hoping that Friday is review day :-) Ping ! On 17/09/2023 22:41, François Dumont wrote: libstdc++: [_Hashtable] Avoid redundant usage of rehash policy Bypass usage of __detail::__distance_fwd and check for need to rehash when assigning an initializer_list

[PATCH] Avoid vector -Wfree-nonheap-object warnings

2024-05-22 Thread François Dumont
As explained in this email: https://gcc.gnu.org/pipermail/libstdc++/2024-April/058552.html I experimented -Wfree-nonheap-object because of my enhancements on algos. So here is a patch to extend the usage of the _Guard type to other parts of vector.     libstdc++: Use RAII to replace try/catc

Re: [PATCH] Avoid vector -Wfree-nonheap-object warnings

2024-05-23 Thread François Dumont
On 23/05/2024 15:31, Jonathan Wakely wrote: On 23/05/24 06:55 +0200, François Dumont wrote: As explained in this email: https://gcc.gnu.org/pipermail/libstdc++/2024-April/058552.html I experimented -Wfree-nonheap-object because of my enhancements on algos. So here is a patch to extend the

Re: [PATCH] Avoid vector -Wfree-nonheap-object warnings

2024-05-25 Thread François Dumont
On 24/05/2024 16:17, Jonathan Wakely wrote: On Thu, 23 May 2024 at 18:38, François Dumont wrote: On 23/05/2024 15:31, Jonathan Wakely wrote: On 23/05/24 06:55 +0200, François Dumont wrote: As explained in this email: https://gcc.gnu.org/pipermail/libstdc++/2024-April/058552.html I

Re: [PATCH] Avoid vector -Wfree-nonheap-object warnings

2024-05-26 Thread François Dumont
/2024 16:17, Jonathan Wakely wrote: On Thu, 23 May 2024 at 18:38, François Dumont wrote: On 23/05/2024 15:31, Jonathan Wakely wrote: On 23/05/24 06:55 +0200, François Dumont wrote: As explained in this email: https://gcc.gnu.org/pipermail/libstdc++/2024-April/058552.html I experimented -

[PATCH] Fix -Wstringop-overflow warning in 23_containers/vector/types/1.cc

2024-05-27 Thread François Dumont
In C++98 this test fails with: Excess errors: /home/fdumont/dev/gcc/build/x86_64-pc-linux-gnu/libstdc++-v3/include/bits/stl_algobase.h:452: warning: 'void* __builtin_memcpy(void*, const void*, long unsigned int)' writing between 2 and 9223372036854775806 bytes into a region of size 0 overflows

Re: [PATCH] Fix -Wstringop-overflow warning in 23_containers/vector/types/1.cc

2024-05-27 Thread François Dumont
/2024 22:18, Sam James wrote: François Dumont writes: In C++98 this test fails with: For this, and your other -Wfree-nonheap-object patches, could you see if it helps with any of the bugs reported for both -Wstringop-overflow and -Wfree-nonheap-object in libstdc++? There's a bunch of (possi

Re: [PATCH] Avoid vector -Wfree-nonheap-object warnings

2024-05-28 Thread François Dumont
. Tested under Linux x86_64. Ok to commit ? François On 28/05/2024 12:30, Jonathan Wakely wrote: On Mon, 27 May 2024 at 05:37, François Dumont wrote: Here is a new version working also in C++98. Can we use a different solution that doesn't involve an explicit template argument list for

Re: [PATCH] Fix -Wstringop-overflow warning in 23_containers/vector/types/1.cc

2024-05-29 Thread François Dumont
in mind do not hesitate to tell me. François On 28/05/2024 12:28, Jonathan Wakely wrote: On 27/05/24 22:07 +0200, François Dumont wrote: In C++98 this test fails with: Excess errors: /home/fdumont/dev/gcc/build/x86_64-pc-linux-gnu/libstdc++-v3/include/bits/stl_algobase.h:452: warn

Re: [PATCH] Fix -Wstringop-overflow warning in 23_containers/vector/types/1.cc PR109849

2024-06-02 Thread François Dumont
k to commit ? François On 30/05/2024 13:07, Jonathan Wakely wrote: On Thu, 30 May 2024 at 06:11, François Dumont wrote: Looks like this new version works the same to fix the warning without the issues reported here. All 23_containers/vector tests run in C++98/14/20 so far. Ok to commit once I'

Re: [PATCH] Fix -Wstringop-overflow warning in 23_containers/vector/types/1.cc PR109849

2024-06-03 Thread François Dumont
On 03/06/2024 18:20, Jonathan Wakely wrote: On Mon, 3 Jun 2024 at 05:56, François Dumont wrote: I hadn't try to make my patch as limited as possible to fix the problem, indeed. libstdc++: Fix -Wstringop-overflow warning coming from std::vector [PR109849] libstdc++-v3/Chan

Re: [PATCH][_Hashtable] Fix some implementation inconsistencies

2024-06-06 Thread François Dumont
No chance ? On 22/05/2024 06:50, François Dumont wrote: Ping ? On 13/05/2024 06:33, François Dumont wrote: libstdc++: [_Hashtable] Fix some implementation inconsistencies     Get rid of the different usages of the mutable keyword except in     _Prime_rehash_policy where it is preserved for

[_Hashtable] Optimize destructor

2024-06-09 Thread François Dumont
Hi libstdc++: [_Hashtable] Optimize destructor Hashtable destructor do not need to call clear() method that in addition to destroying all nodes also reset all buckets to nullptr. libstdc++-v3/ChangeLog:     * include/bits/hashtable.h (~_Hashtable()): Replace clear call with     a _M_deallocate

[PATCH] libstdc++: Do not use memset _Hashtable buckets allocation

2024-06-13 Thread François Dumont
Hi Following your recent change here: https://gcc.gnu.org/pipermail/libstdc++/2024-June/058998.html I think we also need to fix the memset at bucket allocation level. I did it trying also to be more fancy pointer friendly by running __uninitialized_default_n_a on the allocator returned pointe

[committed] Fix compilation error in 2 1_neg.cc tests

2024-07-31 Thread François Dumont
Committed as trivial. Fix a compilation error that is not expected by the tests preserving the expected ones. The 'test' variable declaration is missing since commit a9260b7eb688df43a724e25421ba40f35a89fee9 that removed the test global variable in testsuite files. libstdc++-v3/ChangeLog:     *

Re: [committed] Fix compilation error in 2 1_neg.cc tests

2024-07-31 Thread François Dumont
Wed, 31 Jul 2024 at 21:59, Jonathan Wakely wrote: On Wed, 31 Jul 2024 at 21:44, François Dumont wrote: Committed as trivial. Fix a compilation error that is not expected by the tests preserving the expected ones. The 'test' variable declaration is missing si

Re: [PATCH] libstdc++: Do not use memset _Hashtable buckets allocation

2024-06-15 Thread François Dumont
pointers.     (_Hashtable_alloc::_M_deallocate_buckets): Add destroy of buckets. Tested under Linux x64, ok to commit ? François On 13/06/2024 20:58, Jonathan Wakely wrote: On Thu, 13 Jun 2024 at 19:57, Jonathan Wakely wrote: On Thu, 13 Jun 2024 at 18:40, François Dumont wrote: Hi

Re: [PATCH][_Hashtable] Fix some implementation inconsistencies

2024-06-23 Thread François Dumont
Hi Still no time ? Thanks On 06/06/2024 19:02, François Dumont wrote: No chance ? On 22/05/2024 06:50, François Dumont wrote: Ping ? On 13/05/2024 06:33, François Dumont wrote: libstdc++: [_Hashtable] Fix some implementation inconsistencies     Get rid of the different usages of the

[PATCH] _Hashtable fancy pointer support

2024-06-26 Thread François Dumont
Hi Here is my proposal to add support for fancy allocator pointer. The only place where we still have C pointers is at the iterator::pointer level but it's consistent with std::list implementation and also logical considering that we do not get value_type pointers from the allocator. I also

Re: [PATCH] _Hashtable fancy pointer support

2024-06-27 Thread François Dumont
Thanks for the link, based on it I removed some of the nullptr usages keeping only assignments. François On 26/06/2024 23:41, Jonathan Wakely wrote: On Wed, 26 Jun 2024 at 21:39, François Dumont wrote: Hi Here is my proposal to add support for fancy allocator pointer. The only place where

Re: [PATCH] _Hashtable fancy pointer support

2024-06-29 Thread François Dumont
On 27/06/2024 22:30, Jonathan Wakely wrote: On Thu, 27 Jun 2024 at 20:25, François Dumont wrote: Thanks for the link, based on it I removed some of the nullptr usages keeping only assignments. That's not necessary. A nullable pointer type is equality comparable with nullptr_t, and nu

Re: [PATCH] Reimplement __gnu_cxx::__ops operators

2023-12-06 Thread François Dumont
I think I still got no feedback about this cleanup proposal. Here is a new version. François On 15/06/2023 07:07, François Dumont wrote: I think we all agree that __gnu_cxx::__ops needed to be reimplemented, here it is. Note that I kept the usage of std::ref in , and .     libstdc

Re: [PATCH] Reimplement __gnu_cxx::__ops operators

2023-12-09 Thread François Dumont
On 07/12/2023 14:41, Jonathan Wakely wrote: On Wed, 6 Dec 2023 at 20:55, François Dumont wrote: I think I still got no feedback about this cleanup proposal. Can you remind me why we have all those different functions in predefined_ops.h in the first place? I think it was to avoid having two

Re: [committed] Fix compilation error in 2 1_neg.cc tests

2024-08-01 Thread François Dumont
(test01): Remove test variable     and use 'no match' dg-error patter.     * testsuite/23_containers/set/operators/1_neg.cc (test01): Likewise. Comitted with you as author. François On 01/08/2024 09:26, Jonathan Wakely wrote: On Thu, 1 Aug 2024 at 06:09, François Dum

[PATCH] Add fancy pointer support in std::map/set

2024-08-01 Thread François Dumont
Hi Here is a proposal to add fancy pointer support in std::_Rb_tree container. As you'll see there are still several usages of pointer_traits<>::pointer_to. The ones in _M_header_ptr() are unavoidable. The ones to extract a node or to return a node to the allocator are more questionable. Are

[PATCH][_Hashtable] Add missing destructor call

2023-11-06 Thread François Dumont
Noticed looking for other occasion to replace __try/__catch with RAII helper.     libstdc++: [_Hashtable] Add missing node destructor call     libstdc++-v3/ChangeLog:     * include/bits/hashtable_policy.h     (_Hashtable_alloc<>::_M_allocate_node): Add missing call to node des

Re: [PATCH][_Hashtable] Add missing destructor call

2023-11-07 Thread François Dumont
On 07/11/2023 00:28, Jonathan Wakely wrote: On Mon, 6 Nov 2023 at 21:39, François Dumont wrote: Noticed looking for other occasion to replace __try/__catch with RAII helper. libstdc++: [_Hashtable] Add missing node destructor call libstdc++-v3/ChangeLog

[PATCH][_Hahstable] Use RAII to guard node pointer while constructing

2023-11-08 Thread François Dumont
Another proposal to use RAII rather than __try/__catch block. libstdc++: [_Hashtable] Use RAII type to guard node while constructing value libstdc++-v3/ChangeLog:     * include/bits/hashtable_policy.h     (struct _NodePtrGuard<_HashtableAlloc, _NodePtr>): New.     (_ReuseAllocNode::

[PATCH] Fix some _Hashtable implementation inconsistencies

2023-11-14 Thread François Dumont
Following several remarks on a previous patch of _Hashtable I considered clarifying its implementation.     libstdc++: [_Hashtable] Fix some implementation inconsistencies     Get rid of the different usages of the mutable keyword. For     _Prime_rehash_policy methods are exported from the libr

[PATCH 0/5][_Hashtable] Optimize insertions

2023-11-23 Thread François Dumont
This is a series of patch to enhance _Hashtable insertion operations that I'd like to see in gcc 14. I've already submitted something similar a couple of months ago but it is quite a revisited version. 1/5 Is adding benches to show the impact of the different optimizations 2/5 Implementation i

[PATCH 1/5][_Hashtable] Add benches

2023-11-23 Thread François Dumont
libstdc++: [_Hashtable] Enhance/Add performance benches diff --git a/libstdc++-v3/testsuite/performance/23_containers/insert/54075.cc b/libstdc++-v3/testsuite/performance/23_containers/insert/54075.cc index f8fcce31609..f2d975ecdaf 100644 --- a/libstdc++-v3/testsuite/performance/23_containers/in

[PATCH 2/5][_Hashtable] Fix implementation inconsistencies

2023-11-23 Thread François Dumont
    libstdc++: [_Hashtable] Fix some implementation inconsistencies     Get rid of the different usages of the mutable keyword. For     _Prime_rehash_policy methods are exported from the library, we need to     keep their const qualifier, so adapt implementation to update previously     mutable

[PATCH 3/5][_Hashtable] Avoid redundant usage of rehash policy

2023-11-23 Thread François Dumont
    libstdc++: [_Hashtable] Avoid redundant usage of rehash policy     Bypass call to __detail::__distance_fwd and the check if rehash is needed when     assigning an initializer_list to an unordered_multimap or unordered_multiset.     libstdc++-v3/ChangeLog:     * include/bits/hasht

[PATCH 5/5][_Hashtable] Prefer to insert after last node

2023-11-23 Thread François Dumont
    libstdc++: [_Hashtable] Prefer to insert after last node     When inserting an element into an empty bucket we currently insert the new node     after the before-begin node so in first position. The drawback of doing this is     that we are forced to update the bucket that was containing th

[PATCH 4/5][_Hashtable] Generalize the small size optimization

2023-11-23 Thread François Dumont
    libstdc++: [_Hashtable] Extend the small size optimization     A number of methods were still not using the small size optimization which     is to prefer an O(N) research to a hash computation as long as N is small.     libstdc++-v3/ChangeLog:     * include/bits/hashtable.h: Mov

Re: New unordered containers debug check

2012-10-16 Thread François Dumont
Attached patch applied. 2012-10-16 François Dumont * include/debug/formatter.h (_Debug_msg_id): Add __msg_bucket_index_oob. * include/debug/macros.h (__glibcxx_check_bucket_index): New. * include/debug/unordered_set (unordered_set<>::begin(size_type)): Add check on

Re: Yet another debug check for unordered containers

2012-10-18 Thread François Dumont
On 10/18/2012 11:12 AM, Paolo Carlini wrote: On 10/17/2012 10:05 PM, François Dumont wrote: Ok to commit ? Ok, thanks. Paolo. Attached patch applied. 2012-10-18 François Dumont * include/debug/formatter.h (_Debug_msg_id): Add __msg_valid_load_factor. * include/debug

Re: unordered set design modification

2012-10-21 Thread François Dumont
On 10/21/2012 11:47 AM, Paolo Carlini wrote: On 10/20/2012 11:07 PM, François Dumont wrote: I have also put a fix in profile/map.h even if it is unrelated to this evolution. Should I commit it outside this patch ? Yes please! Thanks, Paolo. Attached patch applied. 2012-10-21

Re: unordered set design modification

2012-10-22 Thread François Dumont
Attached patch applied. 2012-10-22 François Dumont * include/bits/unordered_set.h (unordered_set<>): Prefer aggregation to inheritance with _Hashtable. (unordered_multiset<>): Likewise. * include/debug/unordered_set (operator==): Adapt. * include/profile/u

Re: unordered map design modification

2012-10-27 Thread François Dumont
On 10/26/2012 10:41 AM, Paolo Carlini wrote: On 10/25/2012 10:15 PM, François Dumont wrote: Here is the patch to apply the same modification applied to unordered_set and unordered_multiset. It also use default implementation for unordered_set/unordered_multiset copy/move constructor

Re: Optimize hashtable allocator

2012-10-31 Thread François Dumont
eIterator and Tr1HashtableIterator printers? Yes, I think the same code could deal both type of iterators. 2012-09-29 François Dumont 2012-10 :) + + template + _Before_begin(_Alloc __a) + : _NodeAlloc(__a) + { } Can this use a "universal reference" (

Re: Optimize hashtable allocator

2012-11-01 Thread François Dumont
Attached patch applied. 2012-11-01 François Dumont * include/bits/hashtable_policy.h (__details::_Before_begin<>): New, combine a base node instance and an allocator. * include/bits/hashtable.h (_Hashtable<>::_M_node_allocator): Remove. (_Hashtable<>::_M_bef

Re: exception safety validation

2012-11-03 Thread François Dumont
On 09/28/2012 10:14 PM, François Dumont wrote: Hi I enhance scope of the small exception safety test framework used to validate different levels of exception safety through the containers operations. I have added calls to C++ methods emplace/emplace_front/emplace_back/emplace_hint in C

Re: exception safety validation

2012-11-03 Thread François Dumont
On 11/03/2012 03:12 PM, Jonathan Wakely wrote: On 3 November 2012 14:11, Jonathan Wakely wrote: On 3 November 2012 13:53, François Dumont wrote: Here is an updated proposal using default implementations as much as possible. Please check the indentation of the "struct emplace_

Re: exception safety validation

2012-11-05 Thread François Dumont
I apply the attached patch. 2012-10-05 François Dumont * include/ext/throw_allocator.h (__throw_value_base): Add move semantic, not throwing. (__throw_value_limit): Likewise. (__throw_value_random): Likewise. * testsuite/util/exception/safety.h: Add validation of C++11

Re: [Bug libstdc++/54075] [4.7.1] unordered_map insert still slower than 4.6.2

2012-11-07 Thread François Dumont
Here is the patch to fix the redundant rehash/reserve issue. 2012-11-07 François Dumont PR libstdc++/54075 * include/bits/hashtable.h (_Hashtable<>::rehash): Reset hash policy state if no rehash. * testsuite/23_containers/unordered_set/modifiers/reserve.cc (test02

Re: [Bug libstdc++/54075] [4.7.1] unordered_map insert still slower than 4.6.2

2012-11-08 Thread François Dumont
Attached patch applied to trunk and 4.7 branch. 2012-11-08 François Dumont PR libstdc++/54075 * include/bits/hashtable.h (_Hashtable<>::rehash): Reset hash policy state if no rehash. * testsuite/23_containers/unordered_set/modifiers/reserve.cc (test02): New. Fr

Re: PR 58148 patch

2013-08-29 Thread François Dumont
Indeed, I check the Standard about const_pointer, so here is another attempt. Tested under Linux x86_64. 2013-08-29 François Dumont PR libstdc++/58148 * include/debug/functions.h (__foreign_iterator_aux4): Use sequence const_pointer as common type to compare pointers. Add a

Re: PR 58191 patch

2013-08-30 Thread François Dumont
Hi I finally generalized this method to other debug functions, it is more consistent and clean the implementation of the debug checks. For 4.8 branch I will limit it to just what need to be really fixed. 2013-08-30 François Dumont PR libstdc++/58191 * include/debug/macros.h

Re: PR 58148 patch

2013-08-30 Thread François Dumont
Yes, this was cleaner, tested and committed this way. 2013-08-30 François Dumont PR libstdc++/58148 * include/debug/functions.h (__foreign_iterator_aux4): Use sequence const_pointer as common type to compare pointers. Add a fallback overload in case pointers cannot be cast to

Re: Remove algo logic duplication Round 3

2013-09-28 Thread François Dumont
next time. 2013-09-28 François Dumont * include/bits/stl_algo.h (remove_copy, remove_copy_if): Declare inline. (rotate_copy, stable_partition, partial_sort_copy): Likewise. (lower_bound, upper_bound, equal_range, inplace_merge): Likewise. (includes, next_permutation, prev_p

Debug functions review

2013-10-22 Thread François Dumont
Hi Here is a patch to clean up a little some debug functions. I got rid of the __check_singular_aux, simply playing with __check_singular overloads was enough. I also added the missing __check_dereferenceable for safe local iterators. 2013-10-22 François Dumont * include/debug

Re: Debug functions review

2013-10-23 Thread François Dumont
On 10/23/2013 12:37 AM, Paolo Carlini wrote: Hi, "François Dumont" ha scritto: Hi Here is a patch to clean up a little some debug functions. I got rid of the __check_singular_aux, simply playing with __check_singular overloads was enough. I also added t

Re: Debug functions review

2013-10-24 Thread François Dumont
On 10/24/2013 12:12 AM, Paolo Carlini wrote: On 10/23/2013 11:22 PM, François Dumont wrote: You are right, I am preparing a test case. However you have to know that __check_dereferenceable is simply not used for the moment. It is only because I have started using it for a debug mode evolution

[patch] safe iterator simplification

2013-11-07 Thread François Dumont
__get_distance can be simplified to only take one type of iterator, _M_valid_range is not a template method anymore. I also modified _BeforeBeginHelper so that it also generates consistent comparisons of iterators. 2013-11-08 François Dumont * include/debug/safe_iterator.h (_BeforeBeginHelper

Remove debug local iterator bucket information

2013-11-20 Thread François Dumont
Hi At the time of writing unordered container debug mode, local iterator didn't have the bucket information. Now they have so I would like debug mode to use it rather than duplicating the information. 2013-11-21 François Dumont * include/debug/safe_local_itera

Remove unordered containers iterators default initialization

2013-11-25 Thread François Dumont
Hi Following N3644 discussion thread here is a patch proposal to remove default zero-initialization of unordered containers iterator. I also took the time to remove default zero-init of nodes _M_nxt pointer. 2013-11-25 François Dumont * include/bits/hashtable_policy.h

Re: Unordered container insertion hints

2013-06-06 Thread François Dumont
On 05/24/2013 01:00 AM, Paolo Carlini wrote: On 05/23/2013 10:01 PM, François Dumont wrote: Some feedback regarding this patch ? Two quick ones: what if the hint is wrong? I suppose the insertion succeeds anyway, it's only a little waste of time, right? Right. Is it possible tha

Re: Unordered container insertion hints

2013-06-12 Thread François Dumont
Hi Any news regarding this patch ? Thanks François On 06/06/2013 10:33 PM, François Dumont wrote: On 05/24/2013 01:00 AM, Paolo Carlini wrote: On 05/23/2013 10:01 PM, François Dumont wrote: Some feedback regarding this patch ? Two quick ones: what if the hint is wrong? I suppose the

Re: Unordered container insertion hints

2013-06-19 Thread François Dumont
hint. François On 06/12/2013 10:12 PM, François Dumont wrote: Hi Any news regarding this patch ? Thanks François On 06/06/2013 10:33 PM, François Dumont wrote: On 05/24/2013 01:00 AM, Paolo Carlini wrote: On 05/23/2013 10:01 PM, François Dumont wrote: Some feedback regarding this patch

Re: Unordered container insertion hints

2013-06-29 Thread François Dumont
Patch applied, I also needed to update some dg-error line numbers, it was not part of the original patch. The only remaining thing will be to update the doxygen links on the unordered containers to point to the new hint doc. 2013-06-29 François Dumont * include/bits

unordered containers: reuse nodes on assignment

2013-06-30 Thread François Dumont
parameter on the friend declaration that I finally removed on the definition. But gcc didn't complained and use it as a valid friend declaration, should it be reported as a gcc bug ? 2013-07-01 François Dumont * include/bits/hashtable_policy.h (_ReuseOrAllocNode): Use forward pa

Re: unordered containers: reuse nodes on assignment

2013-07-01 Thread François Dumont
This is it indeed, I am surprised this problem is so old, a Standard issue perhaps ? If not I might add it to my todo list. François On 06/30/2013 09:43 PM, Paolo Carlini wrote: .. looks like PR39269, but please double check. Paolo.

Re: unordered containers: reuse nodes on assignment

2013-07-04 Thread François Dumont
On 07/01/2013 11:35 PM, Paolo Carlini wrote: On 07/01/2013 09:35 PM, François Dumont wrote: This is it indeed, I am surprised this problem is so old, a Standard issue perhaps ? If not I might add it to my todo list. Yesterday I had a look and I think it's just a bug, I found in Bugzi

Re: unordered containers: reuse nodes on assignment

2013-07-05 Thread François Dumont
Patch applied. I also found the number of template parameters painful. Isolating a part of the _Hashtable in a base class is a good idea and seems to be the solution indeed, I will have a try. François On 07/05/2013 12:28 AM, Jonathan Wakely wrote: On 4 July 2013 21:54, François Dumont

Re: PR 57779 New debug check

2013-07-31 Thread François Dumont
, François Dumont wrote: On 07/24/2013 10:49 AM, Paolo Carlini wrote: Hi, I didn't follow the finest details of this (Jonathan will be able to provide better comments) but it's not immediately obvious to me what happens of the -1 + 1 trick when begin() == end(). In my opinion, we should

Re: PR 57779 New debug check

2013-08-01 Thread François Dumont
-08-01 François Dumont PR libstdc++/57779 * include/debug/formatter.h (_Debug_msg_id): Add __msg_insert_itself_range entry. * include/debug/functions.h (_Insert_range_from_self_is_safe<>): New, indicate container types supporting self range insertion in GNU im

Re: Limit template parameters in hashtable

2013-08-06 Thread François Dumont
Ok then attached patch applied. 2013-08-06 François Dumont * include/bits/hashtable_policy.h (_Hashtable_alloc): New. (_ReuseOrAllocNode, _AllocNode): Adapt to use latter rather than _Hashtable. (_Before_begin<>): Remove. * include/bits/hashtable.h (_Hashtable): I

std::vector move assign patch

2013-12-27 Thread François Dumont
patch also fix those issues in the debug mode for the vector container. Fixes for other containers in debug mode will come later. 2013-12-27 François Dumont * include/bits/stl_vector.h (std::vector<>::_M_move_assign): Pass *this allocator instance when building temporary

Rb tree node recycling patch

2013-12-27 Thread François Dumont
looks good enough to me. If you want me to add some I will when back from vacation. I am mostly submitting this patch to show you that I worked on it and you do not need to do it yourself. 2013-12-27 François Dumont * include/bits/stl_tree.h (_Rb_tree_reuse_or_alloc_node<

Re: Rb tree node recycling patch

2014-01-03 Thread François Dumont
at for example at my new tests which feature: // { dg-options "-std=gnu++11" } // { dg-options "-std=gnu++11 -DSIMULATOR_TEST" { target simulator } } Which enables the macro SIMULATOR_TEST on simulators, where I do much less testing (else the tester takes too long. On 2

Re: std::vector move assign patch

2014-01-07 Thread François Dumont
I saw on another thread that 4.9 release was getting closer. Applying this patch sounds like a good idear for this release. Any feedback ? On 12/27/2013 07:27 PM, François Dumont wrote: Hi Here is a patch to fix an issue in normal mode during the move assignment. The destination vector

PR 59712 patch

2014-01-09 Thread François Dumont
clang feedback would be appreciated. 2014-01-10 François Dumont * include/bits/hashtable_policy.h: Fix some long lines. * include/bits/hashtable.h (__hash_code_base_access): Define and use it to check its _M_bucket_index noexcept qualification. Use also in pla

Re: Rb tree node recycling patch

2014-01-09 Thread François Dumont
On 01/08/2014 02:34 PM, Paolo Carlini wrote: Hi, On 12/27/2013 07:30 PM, François Dumont wrote: Note that this patch contains also a cleanup of a useless template parameter _Is_pod_comparator on _Rb_tree_impl. The useless parameter is a remnant of an attempt at exploiting the EBO for

Re: PR 59712 patch

2014-01-11 Thread François Dumont
On 01/09/2014 11:49 PM, Jonathan Wakely wrote: On 9 January 2014 21:55, François Dumont wrote: All unordered_* tests run under Linux x86_64. Please make sure you run the entire testsuite, not just the parts that seem relevant. Done and no failure, ok to commit ? François

Re: Fix tree containers debug mode C++11 allocator awareness

2014-01-13 Thread François Dumont
On 12/22/2013 09:55 PM, François Dumont wrote: On 12/22/2013 12:51 PM, Jonathan Wakely wrote: On 21 December 2013 08:51, François Dumont wrote: Any feedback for this proposal ? It looks good but I don't have time to review it fully yet, please be patient. I'm more concerned

experimental testsuite patch

2014-01-15 Thread François Dumont
the assertion or remove the constexpr (maybe only in debug mode ?) ? 2014-01-15 François Dumont * scripts/create_testsuite_files: Add testsuite/experimental in the list of folders to introspect for tests. * testsuite/experimental/string_view/element_access/wchar_t/2.cc: Merg

Tree containers profile mode fix

2014-01-15 Thread François Dumont
t some explicit instantiations failed then in the tests. Is it a gcc limitation or a Standard requirement to refuse explicit instantiation of a template alias ? If It could be interpreted as an explicit instantiation of the underlying type it would be really useful. 2014-01-15 François Dumont

Re: experimental testsuite patch

2014-01-19 Thread François Dumont
So here is another patch proposal with the faulty debug assertion commented for the moment. 2014-01-20 François Dumont * scripts/create_testsuite_files: Add testsuite/experimental in the list of folders to introspect for tests. * include/experimental/string_view

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