Re: [PATCH 2/2] libstdc++: mark 20_util/scoped_allocator/noexcept.cc R-E-T hosted

2023-11-09 Thread Jonathan Wakely
On Thu, 9 Nov 2023 at 19:32, Arsen Arsenović wrote: > > libstdc++-v3/ChangeLog: > > * testsuite/20_util/scoped_allocator/noexcept.cc: Mark as > requiring hosted. OK for trunk, thanks. The test has been backported, but we don't have the hosted et there so this isn't needed on the

Re: [PATCH] libstdc++: Fix forwarding in __take/drop_of_repeat_view [PR112453]

2023-11-09 Thread Jonathan Wakely
On Thu, 9 Nov 2023 at 16:01, Patrick Palka wrote: > > Tested on x86_64-pc-linux-gnu, does this look OK for trunk/13? (The > && overloads are also missing on earlier branches, but I don't think > it makes a difference there since all uses of that operator* are on > lvalues before this fix.) OK

Re: [PATCH] libsupc++: try cxa_thread_atexit_impl at runtime

2023-11-09 Thread Jonathan Wakely
On Thu, 9 Nov 2023 at 01:56, Alexandre Oliva wrote: > > > g++.dg/tls/thread_local-order2.C fails when the toolchain is built for > a platform that lacks __cxa_thread_atexit_impl, even if the program is > built and run using that toolchain on a (later) platform that offers >

Re: [PATCH][_Hashtable] Use RAII to restore Rehash state

2023-11-09 Thread Jonathan Wakely
On Thu, 26 Oct 2023 at 21:52, François Dumont wrote: > > > On 26/10/2023 12:43, Jonathan Wakely wrote: > > On 26/10/23 07:18 +0200, François Dumont wrote: > >> libstdc++: [_Hashtable] Use RAII type to manage rehash functor state > >> > >> Repla

Re: [PATCH v2] libstdc++: optimize bit iterators assuming normalization [PR110807]

2023-11-08 Thread Jonathan Wakely
On Thu, 9 Nov 2023, 01:17 Alexandre Oliva, wrote: > On Nov 8, 2023, Jonathan Wakely wrote: > > > A single underscore prefix on __GLIBCXX_BUILTIN_ASSUME and > > __GLIBCXX_DISABLE_ASSUMPTIONS please. > > That's entirely

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

2023-11-08 Thread Jonathan Wakely
On Wed, 8 Nov 2023 at 20:00, François Dumont wrote: > > 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

Re: [PATCH] libstdc++: optimize bit iterators assuming normalization [PR110807]

2023-11-08 Thread Jonathan Wakely
On 08/11/23 13:10 -0300, Alexandre Oliva wrote: The representation of bit iterators, using a pointer into an array of words, and an unsigned bit offset into that word, makes for some optimization challenges: because the compiler doesn't know that the offset is always in a certain narrow range,

Re: testsuite: introduce hostedlib effective target

2023-11-08 Thread Jonathan Wakely
On Wed, 8 Nov 2023 at 15:48, Jonathan Wakely wrote: > > On Wed, 8 Nov 2023 at 15:30, Alexandre Oliva wrote: > > > > On Nov 7, 2023, Jonathan Wakely wrote: > > > > > An alternative approach for the g++ testsuite would be to provide a > > > set of dummy

Re: testsuite: introduce hostedlib effective target

2023-11-08 Thread Jonathan Wakely
On Wed, 8 Nov 2023 at 15:30, Alexandre Oliva wrote: > > On Nov 7, 2023, Jonathan Wakely wrote: > > > An alternative approach for the g++ testsuite would be to provide a > > set of dummy headers for the non-freestanding ones, so that all the > > hosted-only headers ar

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

2023-11-08 Thread Jonathan Wakely
On Wed, 8 Nov 2023 at 05:39, François Dumont wrote: > > > 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. > >&

Re: [PATCH] libstdc++/112351 - deal with __gthread_once failure during locale init

2023-11-07 Thread Jonathan Wakely
On Mon, 6 Nov 2023 at 12:52, Richard Biener wrote: > > On Mon, 6 Nov 2023, Jonathan Wakely wrote: > > > On Mon, 6 Nov 2023 at 11:52, Richard Biener wrote: > > > > > > The following makes the C++98 locale init path follow the way the > > > C++11

Re: testsuite: introduce hostedlib effective target

2023-11-07 Thread Jonathan Wakely
On Tue, 7 Nov 2023 at 10:24, Jonathan Wakely wrote: > > On Tue, 7 Nov 2023 at 10:18, Jonathan Wakely wrote: > > > > On Tue, 7 Nov 2023 at 10:04, Alexandre Oliva wrote: > > > > > > [adding libstdc++@] > > > > > > On Nov 5, 2023, Mi

Re: testsuite: introduce hostedlib effective target

2023-11-07 Thread Jonathan Wakely
On Tue, 7 Nov 2023 at 10:18, Jonathan Wakely wrote: > > On Tue, 7 Nov 2023 at 10:04, Alexandre Oliva wrote: > > > > [adding libstdc++@] > > > > On Nov 5, 2023, Mike Stump wrote: > > > > > Ick. > > > > Indeed ;-) > > > >

Re: testsuite: introduce hostedlib effective target

2023-11-07 Thread Jonathan Wakely
On Tue, 7 Nov 2023 at 10:04, Alexandre Oliva wrote: > > [adding libstdc++@] > > On Nov 5, 2023, Mike Stump wrote: > > > Ick. > > Indeed ;-) > > > I wish there were fewer changed lines and not 1 per test > > case. It feels like we've painted ourselves into a corner. > > The libstdc++ testsuite

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

2023-11-06 Thread Jonathan Wakely
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: > > * include/bits/hashtable_policy.h >

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

2023-11-06 Thread Jonathan Wakely
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: > > * include/bits/hashtable_policy.h >

Re: [PATCH] libstdc++/112351 - deal with __gthread_once failure during locale init

2023-11-06 Thread Jonathan Wakely
On Mon, 6 Nov 2023 at 12:16, Jakub Jelinek wrote: > > On Mon, Nov 06, 2023 at 11:52:08AM +, Richard Biener wrote: > > The following makes the C++98 locale init path follow the way the > > C++11 performs initialization. This way we deal with pthread_once > > failing, falling back to

Re: [PATCH] libstdc++/112351 - deal with __gthread_once failure during locale init

2023-11-06 Thread Jonathan Wakely
On Mon, 6 Nov 2023 at 11:52, Richard Biener wrote: > > The following makes the C++98 locale init path follow the way the > C++11 performs initialization. This way we deal with pthread_once > failing, falling back to non-threadsafe initialization which, given we > initialize from the library,

Re: [PATCH] libstdc++/complex: Remove implicit type casts in complex

2023-11-06 Thread Jonathan Wakely
ded in GCC. Please, find my > comments below. Hi, Thanks for the updated patch, test etc. Yes, I think this still makes sense and I'll take care of committing it. > > On Thu, May 11, 2023 at 3:57 PM Jonathan Wakely wrote: >> >> >> >> On Mon, 27 Mar

Re: [PATCH] libstdc++: Improve static assert messages for monadic operations

2023-11-06 Thread Jonathan Wakely
On Thu, 2 Nov 2023 at 14:55, Jonathan Wakely wrote: > > Any objections or suggestions for better wording? > > Tested x86_64-linux. Pushed to trunk. > > -- >8 -- > > The monadic operations for std::optional and std::expected make use of > internal helper traits _

Re: Remove redundant partial specialization in _Nth_type

2023-11-04 Thread Jonathan Wakely
On Sat, 28 Oct 2023 at 14:15, Feng Jisen wrote: > > This patch remove a redundant partial specialization in class _Nth_type. Thanks for the patch, I've pushed it to trunk now. > > For the original metafunction _Nth_type code, > # 0 > template > struct _Nth_type<0, _Tp0, _Rest...> >

[committed] libstdc++: Use strerror_r in std::generic_category()::message(int) [PR110133]

2023-11-04 Thread Jonathan Wakely
Tested x86_64-linux. Pushed to trunk. Probably worth backporting after some time on trunk. -- >8 -- Use strerror_r instead of strerror when available, due to the latter not being thread-safe. This is complicated by Glibc providing a GNU-specific strerror_r which is not compatible with POSIX

[committed] libstdc++: Replace "_N" in examples of naming conventions

2023-11-04 Thread Jonathan Wakely
Pushed to trunk. -- >8 -- The name "_N" is listed as a reserved name on Solaris, so we shouldn't use it as an example of our naming conventions. libstdc++-v3/ChangeLog: * doc/xml/manual/appendix_contributing.xml: Replace example that uses a BADNAME. *

Re: [PATCH] libstdc++: avoid uninitialized read in basic_string constructor

2023-11-03 Thread Jonathan Wakely
On Fri, 3 Nov 2023 at 13:51, Ben Sherman wrote: > > > This was https://gcc.gnu.org/PR109703 (and several duplicates) and > > should already be fixed in all affected branches. Where are you seeing > > this? > > I saw this on 13.1.0 and could not find the bug report or fix for it, so I > didn't

Re: libstdc++ patch RFA: Fix dl_iterate_phdr configury for libbacktrace

2023-11-03 Thread Jonathan Wakely
On Fri, 3 Nov 2023 at 03:04, Ian Lance Taylor wrote: > > The libbacktrace sources, as used by libstdc++-v3, fail to correctly > determine whether the system supports dl_iterate_phdr. The issue is > that the libbacktrace configure assumes that _GNU_SOURCE is defined > during compilation, but the

Re: [PATCH] libstdc++: avoid uninitialized read in basic_string constructor

2023-11-02 Thread Jonathan Wakely
On Thu, 2 Nov 2023 at 19:58, Ben Sherman wrote: > > Tested on x86_64-pc-linux-gnu, please let me know if there's anything > else needed. I haven't contributed before and don't have write access, so > apologies if I've missed anything. This was https://gcc.gnu.org/PR109703 (and several

[committed] libstdc++: Add assertion to std::string_view::remove_suffix [PR112314]

2023-11-02 Thread Jonathan Wakely
Tested x86_64-linux. Pushed to trunk. Backports seem reasonable. -- >8 -- libstdc++-v3/ChangeLog: PR libstdc++/112314 * include/std/string_view (string_view::remove_suffix): Add debug assertion. *

[PATCH] libstdc++: Improve static assert messages for monadic operations

2023-11-02 Thread Jonathan Wakely
Any objections or suggestions for better wording? Tested x86_64-linux. -- >8 -- The monadic operations for std::optional and std::expected make use of internal helper traits __is_optional nad __is_expected, which are not very user-friendly when shown in diagnostics. Add messages to the

[committed] libstdc++: Fix warning during configure

2023-11-02 Thread Jonathan Wakely
Tested x86_64-linux. Pushed to trunk. -- >8 -- The checks for snprintf give a -Wformat warning due to a missing argument. libstdc++-v3/ChangeLog: * acinclude.m4 (GLIBCXX_ENABLE_C99): Fix snprintf checks. * configure: Regenerate. --- libstdc++-v3/acinclude.m4 | 4 ++--

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

2023-11-02 Thread Jonathan Wakely
On Wed, 1 Nov 2023 at 22:11, Gerald Pfeifer wrote: > > On Mon, 18 Sep 2023, Jonathan Wakely via Gcc-patches wrote: > > @@ -103,8 +103,10 @@ ln -s libiconv-1.16 libiconv > > > > If GCC 3.1.0 or later on is being used on GNU/Linux, an attempt > >

Re: [PATCH 2/4] maintainer-scripts/gcc_release: create index between snapshots <-> commits

2023-11-02 Thread Jonathan Wakely
On Thu, 2 Nov 2023 at 10:23, Andreas Schwab wrote: > > On Nov 02 2023, Jonathan Wakely wrote: > > > Git tags are cheap, but I can imagine a concern about hundreds of new > > tags "littering" the output of 'git tag -l'. I don't _think_ you can > > put tag

Re: [PATCH 2/4] maintainer-scripts/gcc_release: create index between snapshots <-> commits

2023-11-02 Thread Jonathan Wakely
On 02/11/23 08:39 +, Sam James wrote: Create and maintain a known_snapshots.txt index with space-separated format BRANCH-DATE COMMIT. For example: 8-20210107 5114ee0676e432493ada968e34071f02fb08114f 8-20210114 f9267925c648f2ccd9e4680b699e581003125bcf ... This is helpful for bisects and

Re: [committed][_GLIBCXX_INLINE_VERSION] Fix constract violation

2023-10-30 Thread Jonathan Wakely
On Mon, 30 Oct 2023, 18:31 François Dumont, wrote: > > On 30/10/2023 14:45, Jonathan Wakely wrote: > > On Sun, 29 Oct 2023 at 21:11, François Dumont > wrote: > >> This fixes handle_contract_violation under versioned namespace mode. > >> > >> Tested

Re: [committed][_GLIBCXX_INLINE_VERSION] Add emul TLS symbol exports

2023-10-30 Thread Jonathan Wakely
On Mon, 30 Oct 2023, 18:07 François Dumont, wrote: > > On 30/10/2023 14:58, Jonathan Wakely wrote: > > On Sun, 29 Oct 2023 at 21:25, François Dumont > wrote: > >> libstdc++: [_GLIBCXX_INLINE_VERSION] Add emul TLS symbols > >> > >> libstdc++-v3/Chang

[committed][wwwdocs] Uncomment link to "Porting to GCC 14"

2023-10-30 Thread Jonathan Wakely
Pushed to wwwdocs. -- >8 -- --- htdocs/gcc-14/changes.html | 2 -- 1 file changed, 2 deletions(-) diff --git a/htdocs/gcc-14/changes.html b/htdocs/gcc-14/changes.html index 5611fc4f..e5d3970c 100644 --- a/htdocs/gcc-14/changes.html +++ b/htdocs/gcc-14/changes.html @@ -17,11 +17,9 @@ This

[committed][wwwdocs] Add "Porting to GCC 14"

2023-10-30 Thread Jonathan Wakely
Pushed to wwwdocs. -- >8 -- --- htdocs/gcc-14/porting_to.html | 50 +++ 1 file changed, 50 insertions(+) create mode 100644 htdocs/gcc-14/porting_to.html diff --git a/htdocs/gcc-14/porting_to.html b/htdocs/gcc-14/porting_to.html new file mode 100644 index

Re: [committed][_GLIBCXX_INLINE_VERSION] Add emul TLS symbol exports

2023-10-30 Thread Jonathan Wakely
On Sun, 29 Oct 2023 at 21:25, François Dumont wrote: > > libstdc++: [_GLIBCXX_INLINE_VERSION] Add emul TLS symbols > > libstdc++-v3/ChangeLog: > > * config/abi/pre/gnu-versioned-namespace.ver: Add missing emul TLS > symbols. Please put a comment above the two new lines, the same as in

Re: [committed][_GLIBCXX_INLINE_VERSION] Fix constract violation

2023-10-30 Thread Jonathan Wakely
On Sun, 29 Oct 2023 at 21:11, François Dumont wrote: > > This fixes handle_contract_violation under versioned namespace mode. > > Tested under Linux x64 and confirmed to also fix Darwin build. > > libstdc++: [_GLIBCXX_INLINE_VERSION] Provide handle_contract_violation > symbol > >

Re: [PATCH htdocs v3] bugs: Mention -D_GLIBCXX_ASSERTIONS and -D_GLIBCXX_DEBUG

2023-10-27 Thread Jonathan Wakely
On Thu, 26 Oct 2023 at 23:40, Gerald Pfeifer wrote: > > On Thu, 26 Oct 2023, Sam James wrote: > > These options both enabled more checking within the C++ standard library > > and can expose errors in submitted code. > > This is a good addition, thank you! I was going to approve/push, but it's >

[committed] libstdc++: Fix exception thrown by std::shared_lock::unlock() [PR112089]

2023-10-26 Thread Jonathan Wakely
Tested x86_64-linux. Pushed to trunk. Worth backporting to all active branches, I think. -- >8 -- The incorrect errc constant here looks like a copy error. libstdc++-v3/ChangeLog: PR libstdc++/112089 * include/std/shared_mutex (shared_lock::unlock): Change errc constant

[committed] libstdc++: Add dg-timeout-factor to IO tests

2023-10-26 Thread Jonathan Wakely
Tested x86_64-linux. Pushed to trunk. Worth backporting to gcc-13 too. -- >8 -- This avoids failures due to compilation timeouts when testing with a low tool_timeout value. libstdc++-v3/ChangeLog: * testsuite/20_util/duration/io.cc: Double timeout using dg-timeout-factor.

Re: [PATCH htdocs] bugs: Mention -D_GLIBCXX_ASSERTIONS and -D_GLIBCXX_DEBUG

2023-10-26 Thread Jonathan Wakely
On Thursday, 26 October 2023, Sam James wrote: > These options both enabled more checking within the C++ standard library > and can expose errors in submitted code. > > -D_GLIBCXX_DEBUG is mentioned separately because while we want people to try it, > it's not always feasible because it requires

Re: [PATCH][_Hashtable] Use RAII to restore Rehash state

2023-10-26 Thread Jonathan Wakely
On 26/10/23 07:18 +0200, François Dumont wrote:     libstdc++: [_Hashtable] Use RAII type to manage rehash functor state     Replace usage of __try/__catch with a RAII type to restore rehash functor     state when needed. Generally I really like replacing try-catch with RAII but I have some

Re: [PATCH][_Hashtable] Use RAII to restore Rehash state

2023-10-26 Thread Jonathan Wakely
On Thu, 26 Oct 2023 at 06:18, François Dumont wrote: > libstdc++: [_Hashtable] Use RAII type to manage rehash functor state > > Replace usage of __try/__catch with a RAII type to restore rehash > functor > state when needed. > I'm reviewing this now, but could I request that you

[committed] libstdc++: Build libstdc++_libbacktrace.a as PIC [PR111936]

2023-10-25 Thread Jonathan Wakely
Tested x86_64-linux. Pushed to trunk, will backport to 12 and 13. -- >8 -- In order for std::stacktrace to be used in a shared library, the libbacktrace symbols need to be built with -fPIC. Add the libtool -prefer-pic flag to the commands in src/libbacktrace/Makefile so that the archive contains

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

2023-10-24 Thread Jonathan Wakely
On Sun, 22 Oct 2023 at 21:06, Arsen Arsenović wrote: > > "Paul M. Bendixen" writes: > > > Updated patch, added the requested files, hopefully wrote the commit > better. > > LGTM. Jonathan? > Yup, looks good. I've pushed it to trunk with a tweaked changelog entry. I'll backport it to gcc-13

Re: [PATCH v25 25/33] libstdc++: Optimize std::is_function compilation performance

2023-10-24 Thread Jonathan Wakely
On Tue, 24 Oct 2023 at 03:16, Ken Matsui wrote: > This patch optimizes the compilation performance of std::is_function > by dispatching to the new __is_function built-in trait. > > libstdc++-v3/ChangeLog: > > * include/std/type_traits (is_function): Use __is_function > built-in

Re: [PATCH] libstdc++: Ensure active union member is correctly set

2023-10-21 Thread Jonathan Wakely
On Fri, 29 Sept 2023 at 17:46, Jonathan Wakely wrote: > > On Fri, 29 Sept 2023 at 17:29, Nathaniel Shead > wrote: > > > > On Fri, Sep 29, 2023 at 04:06:33PM +0100, Jonathan Wakely wrote: > > > On Fri, 29 Sept 2023 at 10:32, Jonathan Wakely wrote: > > &

Re: [PATCH v2] libstdc++: Workaround for LLVM-61763 in ranges

2023-10-21 Thread Jonathan Wakely
On Sat, 21 Oct 2023 at 12:16, Jonathan Wakely wrote: > > On Mon, 16 Oct 2023 at 04:56, Benjamin Acker Brock wrote: > > > > > I don't think this patch counts as legally significant, but if you > > > contribute again in future you should be aware of > > &

Re: [PATCH v2] libstdc++: Workaround for LLVM-61763 in ranges

2023-10-21 Thread Jonathan Wakely
On Mon, 16 Oct 2023 at 04:56, Benjamin Acker Brock wrote: > > > I don't think this patch counts as legally significant, but if you > > contribute again in future you should be aware of > > https://gcc.gnu.org/contribute.html#legal and either complete the copyright > > assignment paperwork, or

Re: [PATCH v2] libstdc++: testsuite: Enhance codecvt_unicode with tests for length()

2023-10-21 Thread Jonathan Wakely
On Wed, 18 Oct 2023 at 11:52, Dimitrij Mijoski wrote: > > We can test codecvt::length() with the same data that we test > codecvt::in(). For each call of in() we add another call to length(). > Some additional small cosmentic changes are applied. Pushed to master, thanks! > >

[committed] libstdc++: Fix formatting of filesystem directory iterators

2023-10-21 Thread Jonathan Wakely
Tested x86_64-linux. Pushed to trunk. -- >8 -- Fix indentation. libstdc++-v3/ChangeLog: * include/bits/fs_dir.h (operator==(default_sentinel_t)): Fix indentation. --- libstdc++-v3/include/bits/fs_dir.h | 16 1 file changed, 8 insertions(+), 8 deletions(-)

Re: [PATCH][_Hashtable] Fix merge

2023-10-19 Thread Jonathan Wakely
On Thursday, 19 October 2023, François Dumont wrote: > libstdc++: [_Hashtable] Do not reuse untrusted cached hash code > > On merge reuse merged node cached hash code only if we are on the same type of > hash and this hash is stateless. Usage of function pointers or std::function as > hash

Re: [PATCH] libstdc++: testsuite: Enhance codecvt_unicode with tests for length()

2023-10-18 Thread Jonathan Wakely
On Tue, 17 Oct 2023 at 23:51, Dimitrij Mijoski wrote: > > We can test codecvt::length() with the same data that we test > codecvt::in(). For each call of in() we add another call to length(). > Some additional small cosmentic changes are applied. Thanks! I'll get this applied. > >

Re: [PATCH] libstdc++: Workaround for LLVM-61763 in ranges

2023-10-14 Thread Jonathan Wakely
On Sat, 14 Oct 2023, 00:33 Benjamin Brock, wrote: > This is my first time submitting a patch, so my apologies if I'm > submitting incorrectly or missing something. > Thanks for contributing! I don't think this patch counts as legally significant, but if you contribute again in future you

Re: Ping: [PATCH v2 1/2] testsuite: Add dg-require-atomic-cmpxchg-word

2023-10-12 Thread Jonathan Wakely
On Thu, 12 Oct 2023, 17:11 Jeff Law, wrote: > > > On 10/12/23 08:38, Christophe Lyon wrote: > > LGTM but I'm not a maintainer ;-) > LGTM to as well -- I usually try to stay out of libstdc++, but this > looks simple enough. Both patches in this series are OK. > Thanks for stepping in, Jeff. The

Re: [PATCH] libstdc++: Fix tr1/8_c_compatibility/cstdio/functions.cc regression with recent glibc

2023-10-12 Thread Jonathan Wakely
On Thursday, 12 October 2023, Jakub Jelinek wrote: > Hi! > > The following testcase started FAILing recently after the > https://sourceware.org/git/?p=glibc.git;a=commit;h=64b1a44183a3094672ed304532bedb9acc707554 > glibc change which marked vfscanf with nonnull (1) attribute. > While vfwscanf

Re: [PATCH][_GLIBCXX_INLINE_VERSION] Add missing symbols

2023-10-05 Thread Jonathan Wakely
On Thu, 5 Oct 2023 at 18:04, François Dumont wrote: > > 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: > > *

Re: [PATCH] wwwdocs: Add ADL to C++ non-bugs

2023-10-05 Thread Jonathan Wakely
On Wed, 4 Oct 2023 at 20:17, Jason Merrill wrote: > > On 10/3/23 10:45, Jonathan Wakely wrote: > > We have a long history of INVALID bugs about std functions being > > available in the global namespace (PRs 27846, 67566, 82619, 99865, > > 110602, 111553, probably

Re: [PATCH 2/2] testsuite: Replace many dg-require-thread-fence with dg-require-atomic-exchange

2023-10-04 Thread Jonathan Wakely
On Wed, 4 Oct 2023 at 16:15, Hans-Peter Nilsson wrote: > > > From: Jonathan Wakely > > Date: Wed, 4 Oct 2023 09:29:43 +0100 > > > The new dg-require proc checks for __atomic_exchange, which is not the > > same as compare-exchange, and not the same as test-and-set on

Re: [committed] libstdc++: Define std::numeric_limits<_FloatNN> before C++23

2023-10-04 Thread Jonathan Wakely
On Wed, 4 Oct 2023 at 16:54, Stephan Bergmann wrote: > > On 8/17/23 22:32, Jonathan Wakely via Libstdc++ wrote: > > Tested x86_64-linux. Pushed to trunk. > > > > -- >8 -- > > > > The extended floating-point types such as _Float32 are supported by GCC

Re: [PATCH] libstdc++: Correctly call _string_types function

2023-10-04 Thread Jonathan Wakely
On Wed, 4 Oct 2023 at 16:10, Tom Tromey wrote: > > flake8 points out that the new call to _string_types from > StdExpAnyPrinter.__init__ is not correct -- it needs to be qualified. OK, thanks. > > libstdc++-v3/ChangeLog: > > * python/libstdcxx/v6/printers.py >

[PATCH] wwwdocs: Add ADL to C++ non-bugs

2023-10-04 Thread Jonathan Wakely
We have a long history of INVALID bugs about std functions being available in the global namespace (PRs 27846, 67566, 82619, 99865, 110602, 111553, probably others). Let's document it. Also de-prioritize the C++98-only bugs, which are unlikely to affect anybody nowadays. OK for wwwdocs? -- >8

[committed,gcc-11] libstdc++: Fix testsuite failures with -O0

2023-10-04 Thread Jonathan Wakely
I've pushed this to gcc-11 after testing on x86_64-linux. -- >8 -- Backport the prune.exp change from r12-4425-g1595fe44e11a96 to fix two testsuite failures when testing with -O0: FAIL: 20_util/uses_allocator/69293_neg.cc (test for excess errors) FAIL: 20_util/uses_allocator/cons_neg.cc (test

Re: [PATCH 2/2] testsuite: Replace many dg-require-thread-fence with dg-require-atomic-exchange

2023-10-04 Thread Jonathan Wakely
On Wed, 4 Oct 2023 at 04:11, Hans-Peter Nilsson wrote: > > > From: Christophe Lyon > > Date: Tue, 3 Oct 2023 15:20:39 +0200 > > > The patch passed almost all our CI configurations, except arm-eabi when > > testing with > > -mthumb/-march=armv6s-m/-mtune=cortex-m0/-mfloat-abi=soft/-mfpu=auto > >

Re: [PATCH 1/2] testsuite: Add dg-require-atomic-exchange non-atomic code

2023-10-04 Thread Jonathan Wakely
On Wed, 4 Oct 2023 at 03:56, Hans-Peter Nilsson wrote: > > > From: Christophe Lyon > > Date: Tue, 3 Oct 2023 15:20:39 +0200 > > > Maybe we need a new variant of dg-require-thread-fence ? > > Yes: many of the dg-require-thread-fence users need > something stronger. Tested arm-eabi together with

Re: [PATCH 1/2] libstdc++: Define _versioned_namespace in xmethods.py

2023-10-03 Thread Jonathan Wakely
On Tue, 3 Oct 2023, 18:19 Tom Tromey, wrote: > flake8 pointed out that is_specialization_of in xmethods.py looks at a > global that wasn't added to the file. This patch correct the > oversight. > OK, thanks > > libstdc++-v3/ChangeLog: > > * python/libstdcxx/v6/xmethods.py

Re: [PATCH 2/2] libstdc++: _versioned_namespace is always non-None

2023-10-03 Thread Jonathan Wakely
On Tue, 3 Oct 2023, 23:55 Jonathan Wakely, wrote: > > > On Tue, 3 Oct 2023, 19:27 Tom Tromey, wrote: > >> Some code in the pretty-printers seems to assume that the >> _versioned_namespace global might be None (or the empty string). >> However, doesn't occur, as th

Re: [PATCH 2/2] libstdc++: _versioned_namespace is always non-None

2023-10-03 Thread Jonathan Wakely
On Tue, 3 Oct 2023, 19:27 Tom Tromey, wrote: > Some code in the pretty-printers seems to assume that the > _versioned_namespace global might be None (or the empty string). > However, doesn't occur, as the variable is never reassigned. > ok for trunk, but we should just remove that bit from

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

2023-10-03 Thread Jonathan Wakely
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 fixing those tests the same way we manage this problem > > in libstdc++

Re: [PATCH] libstdc++: Ensure active union member is correctly set

2023-09-29 Thread Jonathan Wakely
On Fri, 29 Sept 2023 at 17:29, Nathaniel Shead wrote: > > On Fri, Sep 29, 2023 at 04:06:33PM +0100, Jonathan Wakely wrote: > > On Fri, 29 Sept 2023 at 10:32, Jonathan Wakely wrote: > > > > Thanks for the comments, here's an updated version of the patch. > >

Re: [PATCH] libstdc++: Ensure active union member is correctly set

2023-09-29 Thread Jonathan Wakely
On Fri, 29 Sept 2023 at 10:32, Jonathan Wakely wrote: > > Thanks for the comments, here's an updated version of the patch. > > Bootstrapped and regtested on x86_64-pc-linux-gnu. > > Great, I'll get this committed today - thanks! That's done now. > > > > I'll not

Re: [PATCH v3] libstdc++: Fix handling of surrogate CP in codecvt [PR108976]

2023-09-29 Thread Jonathan Wakely
On Thu, 28 Sept 2023 at 20:39, Dimitrij Mijoski via Libstdc++ wrote: > > This patch fixes the handling of surrogate code points in all standard > facets for transcoding Unicode that are based on std::codecvt. Surrogate > code points should always be treated as error. On the other hand > surrogate

Re: Fix compilation errors with libstdc++v3 for AVR target and allow --enable-libstdcxx

2023-09-29 Thread Jonathan Wakely
On Fri, 29 Sept 2023 at 15:07, Jonathan Wakely wrote: > > On Tue, 6 Dec 2016 at 17:59, Jonathan Wakely wrote: > > >Subject: [PATCH 3/3] Enable libstdc++ compilation in AVR targets > > > > > >Enable libstdc++ compilation in AVR targets with AVR-Libc. Most &

Re: Fix compilation errors with libstdc++v3 for AVR target and allow --enable-libstdcxx

2023-09-29 Thread Jonathan Wakely
On Tue, 6 Dec 2016 at 17:59, Jonathan Wakely wrote: > >Subject: [PATCH 3/3] Enable libstdc++ compilation in AVR targets > > > >Enable libstdc++ compilation in AVR targets with AVR-Libc. Most > >floating point math functions are already defined in AVR-Libc, so > >

Re: [PATCH] vec.h, v3: Make some ops work with non-trivially copy constructible and/or destructible types

2023-09-29 Thread Jonathan Wakely
aying with poly_int_pod vs. poly_int and I'll resolve > the remaining stuff incrementally afterwards plus enable the assert. > > Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? > > 2023-09-28 Jakub Jelinek > Jonathan Wakely > >

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

2023-09-29 Thread Jonathan Wakely
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 commit the below > >> then ? > > I

Re: [PATCH] libstdc++: Ensure active union member is correctly set

2023-09-29 Thread Jonathan Wakely
On Fri, 29 Sept 2023 at 00:25, Nathaniel Shead wrote: > > On Wed, Sep 27, 2023 at 03:13:35PM +0100, Jonathan Wakely wrote: > > On Sat, 23 Sept 2023 at 08:30, Nathaniel Shead via Libstdc++ > > wrote: > > > > > > On Sat, Sep 23, 2023 at 07:40:48AM +0100, Jonat

Re: [PATCH 2/7] libstdc++: Use gdb.ValuePrinter base class

2023-09-28 Thread Jonathan Wakely
On Thu, 28 Sept 2023, 21:38 Tom Tromey, wrote: > Jonathan> I've pushed the changes I wanted to make, so you'll have to > rebase > Jonathan> your patches now, sorry. > > No problem. I rebased & re-tested them. > I can send a v2 if you want to double-check (only this large patch > required any

Re: [PATCH 2/7] libstdc++: Use gdb.ValuePrinter base class

2023-09-28 Thread Jonathan Wakely
On Thu, 28 Sept 2023 at 18:50, Tom Tromey via Libstdc++ wrote: > > GDB 14 will add a new ValuePrinter tag class that will be used to > signal that pretty-printers will agree to the "extension protocol" -- > essentially that they will follow some simple namespace rules, so that > GDB can add new

[committed] libstdc++: Refactor Python Xmethods to use is_specialization_of

2023-09-28 Thread Jonathan Wakely
Tested x86_64-linux (GDB 13.2, Python 3.11). Pushed to trunk. -- >8 -- This copies the is_specialization_of function from printers.py (with slight modification for versioned namespace handling) and reuses it in xmethods.py to replace repetitive re.match calls in every class. This fixes the

[committed] libstdc++: Reformat Python code

2023-09-28 Thread Jonathan Wakely
Tested x86_64-linux (GDB 13.2, Python 3.11). Pushed to trunk. -- >8 -- Some of these changes were suggested by autopep8's --aggressive option, others are for readability. Break long lines by splitting strings across multiple lines, or introducing local variables to hold results. Use raw

[committed] libstdc++: Format Python docstrings according to PEP 357

2023-09-28 Thread Jonathan Wakely
Tested x86_64-linux (GDB 13.2, Python 3.11). Pushed to trunk. -- >8 -- libstdc++-v3/ChangeLog: * python/libstdcxx/v6/printers.py: Format docstrings according to PEP 257. * python/libstdcxx/v6/xmethods.py: Likewise. --- libstdc++-v3/python/libstdcxx/v6/printers.py | 177

Re: [PATCH 5/7] libstdc++: Remove std_ratio_t_tuple

2023-09-28 Thread Jonathan Wakely
On Thu, 28 Sept 2023, 18:55 Tom Tromey via Libstdc++, wrote: > This removes the std_ratio_t_tuple function from the Python > pretty-printer code. It is not used. Apparently the relevant parts > were moved to StdChronoDurationPrinter._ratio at some point in the > past. > I think I added it at

Re: [PATCH 3/7] libstdc++: Remove unused Python imports

2023-09-28 Thread Jonathan Wakely
On Thu, 28 Sept 2023, 18:50 Tom Tromey via Libstdc++, wrote: > flake8 pointed out some unused imports. > OK, thanks. > libstdc++-v3/ChangeLog: > > * python/libstdcxx/v6/printers.py: Don't import 'os'. > * python/libstdcxx/v6/__init__.py: Don't import 'gdb'. > --- >

Re: [PATCH 4/7] libstdc++: Remove unused locals from printers.py

2023-09-28 Thread Jonathan Wakely
On Thu, 28 Sept 2023, 18:50 Tom Tromey via Libstdc++, wrote: > flake8 pointed out some unused local variables in the libstdc++ > pretty-printers. This removes them. > OK, thanks. > libstdc++-v3/ChangeLog: > > * python/libstdcxx/v6/printers.py >

Re: [PATCH 7/7] libstdc++: Use Python "not in" operator

2023-09-28 Thread Jonathan Wakely
On Thu, 28 Sept 2023, 18:54 Tom Tromey via Libstdc++, wrote: > flake8 warns about code like > > not something in "whatever" > > Ordinarily in Python this should be written as: > > something not in "whatever" > > This patch makes this change. > OK, thanks. > libstdc++-v3/ChangeLog: >

Re: [PATCH 6/7] libstdc++: Fix regex escapes in pretty-printers

2023-09-28 Thread Jonathan Wakely
On Thu, 28 Sept 2023, 18:50 Tom Tromey via Libstdc++, wrote: > flake8 pointed out that some regexes in the pretty-printers are > missing a backslash. This patch fixes these. > I already have a patch to use r'...' for these, so we only need the single backslash. I'm also refactoring all those

Re: [PATCH 1/7] libstdc++: Show full Python stack on error

2023-09-28 Thread Jonathan Wakely
On Thu, 28 Sept 2023, 18:48 Tom Tromey via Libstdc++, wrote: > This changes the libstdc++ test suite to arrange for gdb to show the > full Python stack if any sort of Python exception occurs. This makes > debugging the printers a little simpler. > Oh I wish I'd known about this sooner. OK for

Re: [committed] libstdc++: Add GDB printers for types

2023-09-28 Thread Jonathan Wakely
On Thu, 28 Sept 2023, 18:37 Tom Tromey, wrote: > Jonathan> The changes made by black seem reasonable, though I prefer it > Jonathan> with -S to disable string-normalization. It also needs an > Jonathan> option to use 79 as the maximum line length. > > I've got some patches I'm about to send. > >

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

2023-09-28 Thread Jonathan Wakely
0 > > * include/bits/hashtable_policy.h > > (_Hash_node_value_base<>::_M_valptr(), > > _Hash_node_value_base<>::_M_v()) > > Add [[__gnu__::__always_inline__]]. > > > > Ok to commit ? > > > > On 12/09/2023

Re: [committed] libstdc++: Add GDB printers for types

2023-09-28 Thread Jonathan Wakely
On Wed, 27 Sept 2023 at 20:57, Jonathan Wakely wrote: > > > > On Wed, 27 Sept 2023, 18:25 Tom Tromey via Libstdc++, < libstd...@gcc.gnu.org> wrote: >> >> >> I have fixes for most of the issues that are worth fixing (I didn't >> >> bother wit

Re: [committed] libstdc++: Add GDB printers for types

2023-09-27 Thread Jonathan Wakely
On Wed, 27 Sept 2023, 18:25 Tom Tromey via Libstdc++, wrote: > >> I have fixes for most of the issues that are worth fixing (I didn't > >> bother with line lengths -- FWIW in gdb we just run 'black' and don't > >> worry about these details), > > Jonathan> I used autopep8 and committed the result

Re: [committed] libstdc++: Add GDB printers for types

2023-09-27 Thread Jonathan Wakely
On Wed, 27 Sept 2023 at 16:37, Tom Tromey wrote: > > >>>>> Jonathan Wakely via Gcc-patches writes: > > Replying to a quite old email... > > I ran a Python linter on the libstdc++ pretty-printers. > > I have fixes for most of the issues that are worth fixi

Re: [PATCH] libstdc++: Ensure active union member is correctly set

2023-09-27 Thread Jonathan Wakely
On Sat, 23 Sept 2023 at 08:30, Nathaniel Shead via Libstdc++ wrote: > > On Sat, Sep 23, 2023 at 07:40:48AM +0100, Jonathan Wakely wrote: > > On Sat, 23 Sept 2023, 01:39 Nathaniel Shead via Libstdc++, < > > libstd...@gcc.gnu.org> wrote: > > > > > Now tha

[committed] libstdc++: Prevent unwanted ADL in std::to_array [PR111512]

2023-09-27 Thread Jonathan Wakely
This is the fix for the release branches, where std::to_array is implemented differently. Tested x86_64-linux. Pushed to gcc-13 and gcc-12. Will push to gcc-11 after testing. -- >8 -- Qualify the calls to the __to_array helper to prevent ADL, so we don't try to complete associated classes.

[committed] libstdc++: Prevent unwanted ADL in std::to_array [PR111512]

2023-09-25 Thread Jonathan Wakely
Tested x86_64-linux. Pushed to trunk. -- >8 -- As noted in PR c++/111512, GCC does ADL for __builtin_memcpy if it is unqualified, which can cause errors for template argument types which cannot be completed. Casting the memcpy arguments to void* prevents ADL from considering the problem type.

[committed] libstdc++: Define C++23 std::forward_like (P2445R1)

2023-09-25 Thread Jonathan Wakely
Tested x86_64-linux. Pushed to trunk. -- >8 -- libstdc++-v3/ChangeLog: * include/bits/move.h (forward_list): Define for C++23. * include/bits/version.def (forward_like): Define. * include/bits/version.h: Regenerate. * include/std/utility

Re: [PATCH] libstdc++: Ensure active union member is correctly set

2023-09-23 Thread Jonathan Wakely
On Sat, 23 Sept 2023, 08:30 Nathaniel Shead, wrote: > On Sat, Sep 23, 2023 at 07:40:48AM +0100, Jonathan Wakely wrote: > > On Sat, 23 Sept 2023, 01:39 Nathaniel Shead via Libstdc++, < > > libstd...@gcc.gnu.org> wrote: > > > > > Now that bootstrap has

Re: [PATCH v4] c++: Check for indirect change of active union member in constexpr [PR101631,PR102286]

2023-09-23 Thread Jonathan Wakely
On Sat, 23 Sept 2023, 01:39 Nathaniel Shead via Libstdc++, < libstd...@gcc.gnu.org> wrote: > Now that bootstrap has finished, I have gotten regressions in the > following libstdc++ tests: > > Running libstdc++:libstdc++-dg/conformance.exp ... > FAIL: 20_util/bitset/access/constexpr.cc

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