Re: [PATCH RFC] c++: use __cxa_call_terminate for MUST_NOT_THROW [PR97720]

2023-05-26 Thread Jonathan Wakely via Gcc-patches
On Wed, 24 May 2023 at 19:56, Jason Merrill via Libstdc++ < libstd...@gcc.gnu.org> wrote: > Middle-end folks: any thoughts about how best to make the change described > in > the last paragraph below? > > Library folks: any thoughts on the changes to __cxa_call_terminate? > I see no harm in export

Re: [PATCH] libstdc++: Fix test assumptions on long and long double

2023-05-26 Thread Jonathan Wakely via Gcc-patches
On Fri, 26 May 2023 at 12:03, Matthias Kretz via Libstdc++ < libstd...@gcc.gnu.org> wrote: > OK for master and all backports (after 11.4 is done) > OK > > tested on powerpc64le-linux-gnu (with 64-bit long double) > > --- 8< > > Expect that long might not fit into the long

Re: [PATCH] libstdc++: Simplify calculation of expected value in simd test

2023-05-26 Thread Jonathan Wakely via Gcc-patches
On Fri, 26 May 2023 at 12:09, Matthias Kretz via Libstdc++ < libstd...@gcc.gnu.org> wrote: > OK for master and all backports (after 11.4 is done)? > OK > > tested on powerpc64le-linux-gnu > > --- 8< > > This avoids a failure on PR109964. > > Signed-off-by: Matthias Kretz

Re: [PATCH] libstdc++: Correct NTTP and simd_mask ctor call

2023-05-26 Thread Jonathan Wakely via Gcc-patches
On Fri, 26 May 2023 at 12:11, Matthias Kretz via Libstdc++ < libstd...@gcc.gnu.org> wrote: > OK for master and all backports (after 11.4 is done)? > OK > > tested on powerpc64le-linux-gnu and x86_64-pc-linux-gnu > > --- 8< > > Signed-off-by: Matthias Kretz > > libstdc++-v

Re: [PATCH] [libstdc++] [testsuite] xfail double-prec from_chars for x86_64 ldbl

2023-05-30 Thread Jonathan Wakely via Gcc-patches
On Tue, 30 May 2023, 05:35 Alexandre Oliva via Libstdc++, < libstd...@gcc.gnu.org> wrote: > > When long double is wider than double, but from_chars is implemented > in terms of double, tests that involve the full precision of long > double are expected to fail. Mark them as such on x86_64-*-vxwor

[committed] libstdc++: Disable embedded tzdata for all 16-bit targets

2023-05-31 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64le-linux. Pushed to trunk. -- >8 -- libstdc++-v3/ChangeLog: * acinclude.m4 (GLIBCXX_ZONEINFO_DIR): Extend logic for avr and msp430 to all 16-bit targets. * configure: Regenerate. --- libstdc++-v3/acinclude.m4 | 15 +-- libstdc++-v3/configure

[committed] libstdc++: Add missing noexcept to std::scoped_allocator_adaptor

2023-05-31 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64le-linux. Pushed to trunk. -- >8 -- The standard requires these constructors and accessors to be noexcept. libstdc++-v3/ChangeLog: * include/std/scoped_allocator (scoped_allocator_adaptor): Add noexcept to all constructors except the default constructor.

[committed] libstdc++: Replace obsolete shell syntax in configure.ac

2023-05-31 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64le-linux. Pushed to trunk. -- >8 -- The current POSIX standard says that the -a and -o operators to the 'test' utility are obsolete, and the shell operators && and || should be used instead. libstdc++-v3/ChangeLog: * configure.ac: Replace use of -o operator for test.

[committed] libstdc++: Add std::numeric_limits<__float128> specialization [PR104772]

2023-05-31 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64le-linux. Pushed to trunk. -- >8 -- As suggested by Jakub in the PR, this just hardcodes the constants with a Q suffix, since the properties of __float128 are not going to change. We can only define it for non-strict modes because the suffix gives an error otherwise, even in syst

[committed] libstdc++: Do not include in

2023-05-31 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64le-linux. Pushed to trunk. -- >8 -- We previously needed in for the std::lock_error exception class, but that was moved out of in 2009 when it was removed from the C++0x draft. We can stop including now. Move the include for to where it's actually used, and only include in

[committed] libstdc++: Deprecate std::setfill for std::basic_istream [PR109922]

2023-05-31 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64le-linux. Pushed to trunk. -- >8 -- Prior to N0966 (July 1996) the std::setfill manipulator was specified to work with both input and output streams. In the final C++98 standard it is only specified to work with output streams. We have always supported it for input streams, despi

[committed] libstdc++: Fix preprocessor conditions for std::from_chars [PR109921]

2023-05-31 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64le-linux. Pushed to trunk. -- >8 -- We use the from_chars_strtod function with __strtof128 to read a _Float128 value, but from_chars_strtod is not defined unless uselocale is available. This can lead to compilation failures for some targets, because we try to define the _Flaot128

Re: [committed] libstdc++: Add std::numeric_limits<__float128> specialization [PR104772]

2023-05-31 Thread Jonathan Wakely via Gcc-patches
On Wed, 31 May 2023 at 13:23, Jonathan Wakely via Libstdc++ < libstd...@gcc.gnu.org> wrote: > Tested powerpc64le-linux. Pushed to trunk. > > -- >8 -- > > As suggested by Jakub in the PR, this just hardcodes the constants with > a Q suffix, since the properties of __float128 are not going to change

Re: Build-break in libstdc++-v3 at r14-1442-ge1240bda3e0bb1 for non-float128 targets

2023-05-31 Thread Jonathan Wakely via Gcc-patches
On Wed, 31 May 2023 at 16:29, Hans-Peter Nilsson via Libstdc++ < libstd...@gcc.gnu.org> wrote: > Since I don't see a quick fix at r14-1444-g3f4853a5f00fab, I > thought I'd better notify the author (I have written authors > if there was more than one ;-) of suspect commits in the > range r14-1425-g

Re: [PATCH] Move std::search into algobase.h

2023-05-31 Thread Jonathan Wakely via Gcc-patches
On Wed, 31 May 2023 at 18:39, François Dumont via Libstdc++ < libstd...@gcc.gnu.org> wrote: > libstdc++: Reduce inclusion to > > > Move the std::search definition from stl_algo.h to stl_algobase.h and use > the later in . > > For consistency also move std::__parallel::search and associated helpe

[committed] libstdc++: Fix configure test for 32-bit targets

2023-05-31 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux. Built msp430-elf and cris-elf. Pushed to trunk. -- >8 -- The -mlarge model for msp430-elf uses 20-bit pointers, which means that sizeof(void*) == 4 and so the r14-1432-g51cf0b3949b88b change gives the wrong answer. Check __INTPTR_WIDTH__ >= 32 instead. libstdc++-v3/ChangeLog

[committed] libstdc++: Fix build for targets without _Float128 [PR109921]

2023-05-31 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux. Built msp430-elf and cris-elf. Pushed to trunk. -- >8 -- My r14-1431-g7037e7b6e4ac41 change caused the _Float128 overload to be compiled unconditionally, by moving the USE_STRTOF128_FOR_FROM_CHARS check into the function body. That function should still only be compiled if th

Re: Build-break in libstdc++-v3 at r14-1442-ge1240bda3e0bb1 for non-float128 targets

2023-05-31 Thread Jonathan Wakely via Gcc-patches
On Wed, 31 May 2023 at 16:32, Jonathan Wakely wrote: > > > On Wed, 31 May 2023 at 16:29, Hans-Peter Nilsson via Libstdc++ < > libstd...@gcc.gnu.org> wrote: > >> Since I don't see a quick fix at r14-1444-g3f4853a5f00fab, I >> thought I'd better notify the author (I have written authors >> if there

[committed] libstdc++: Express std::vector's size() <= capacity() invariant in code

2023-05-31 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux. Pushed to trunk. -- >8 -- This adds optimizer hints so that GCC knows that size() <= capacity() is always true. This allows the compiler to optimize away re-allocating paths when assigning new values to the vector without resizing it, e.g., vec.assign(vec.size(), new_val). l

[committed] libstdc++: Stop using _GLIBCXX_USE_C99_MATH_TR1 in

2023-05-31 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux. Pushed to trunk. -- >8 -- Similar to the three commits r14-908, r14-909 and r14-910, the _GLIBCXX_USE_C99_MATH_TR1 macro is misleading when it is also used for , not only for headers. It is also wrong, because the configure checks for TR1 use -std=c++98 and a target might de

[committed] libstdc++: Add separate autoconf macro for std::float_t and std::double_t [PR109818]

2023-05-31 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux. Pushed to trunk. -- >8 -- This should make it possible to use openlibm with djgpp (and other targets with missing C99 functions). The from openlibm provides all the functions, but not the float_t and double_t typedefs. By separating the autoconf checks for the functionsand

Re: [r14-1452 Regression] FAIL: g++.dg/pr104547.C -std=gnu++17 scan-tree-dump-not vrp2 "_M_default_append" on Linux/x86_64

2023-06-01 Thread Jonathan Wakely via Gcc-patches
On Thu, 1 Jun 2023 at 10:06, Christophe Lyon wrote: > Hi! > > We have noticed the same problem on aarch64, if that's easier to reproduce. > I am already testing a fix.

Re: [PATCH] libstdc++: optimize EH phase 2

2023-06-01 Thread Jonathan Wakely via Gcc-patches
On Thu, 1 Jun 2023 at 04:13, Jason Merrill via Libstdc++ < libstd...@gcc.gnu.org> wrote: > Tested x86_64-pc-linux-gnu, OK for trunk? > OK, thanks. > > -- 8< -- > > In the ABI's two-phase EH model, first we walk the stack looking for a > handler, then we walk the stack running cleanups until we

[PATCH] doc: Fix description of x86 -m32 option [PR109954]

2023-06-01 Thread Jonathan Wakely via Gcc-patches
In https://gcc.gnu.org/PR109954 I suggested also adding: "N.B., using @option{-march} might be required to produce code suitable for a specific CPU family, e.g., @option{-march=i486}." I realise that that is true for all of -m32, -m64 and -mx32, and similar rules apply for other targets too. But

Re: [committed] libstdc++: Fix preprocessor conditions for std::from_chars [PR109921]

2023-06-01 Thread Jonathan Wakely via Gcc-patches
On Thu, 1 Jun 2023 at 10:30, Christophe Lyon via Libstdc++ wrote: > > Hi, > > > On Wed, 31 May 2023 at 14:25, Jonathan Wakely via Gcc-patches < > gcc-patches@gcc.gnu.org> wrote: > > > Tested powerpc64le-linux. Pushed to trunk. > > > > -- >8 -- &g

Re: [PATCH] Move std::search into algobase.h

2023-06-01 Thread Jonathan Wakely via Gcc-patches
On Thu, 1 Jun 2023 at 12:52, Rainer Orth wrote: > Jonathan Wakely via Gcc-patches writes: > > > On Wed, 31 May 2023 at 18:39, François Dumont via Libstdc++ < > > libstd...@gcc.gnu.org> wrote: > > > >> libstdc++: Reduce inclusion to > >>

[committed] libstdc++: Document removal of implicit allocator rebinding extensions

2023-06-01 Thread Jonathan Wakely via Gcc-patches
Pushed to trunk. The first two changes will be backported too. -- >8 -- Traditionally libstdc++ allowed containers and strings to be instantiated with allocator's that have the wrong value type, implicitly rebinding the allocator to the container's value type. Since C++20 that has been explicitly

[committed] libstdc++: Fix code size regressions in std::vector [PR110060]

2023-06-01 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64le-linux. Pusshed to trunk. -- >8 -- My r14-1452-gfb409a15d9babc change to add optimization hints to std::vector causes regressions because it makes std::vector::size() and std::vector::capacity() too big to inline. That's the opposite of what I wanted, so revert the changes to th

[committed] libstdc++: Do not use std::expected::value() in monadic ops (LWG 3938)

2023-06-01 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64le-linux. Pusshed to trunk. -- >8 -- The monadic operations in std::expected always check has_value() so we can avoid the execptional path in value() and the assertions in error() by accessing _M_val and _M_unex directly. This means that the monadic operations no longer require _M

[committed] libstdc++: Fix PSTL test that fails in C++20

2023-06-01 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux. Pushed to trunk, will backport too. Tom, this will require rebasing your PSTL rebase patch, but it should be trivial. -- >8 -- This test fails in C++20 and later due to a warning: warning: C++20 says that these are ambiguous, even though the second is reversed: note: candi

[PATCH] libstdc++: Use AS_IF in configure.ac

2023-06-01 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux. I'd appreciate a second set of eyeballs on this before I push it. -- >8 -- This ensures that anything that depends on AC_REQUIRE is hoisted out of the conditional block. The always-false test x"long_double_math_on_this_cpu" = x"yes" condition is not altered by this commit, o

Re: [PATCH 1/2] libstdc++: Implement more maintainable header

2023-06-01 Thread Jonathan Wakely via Gcc-patches
On Sat, 29 Apr 2023 at 11:25, Arsen Arsenović via Libstdc++ < libstd...@gcc.gnu.org> wrote: > This commit replaces the ad-hoc logic in with an AutoGen > database that (mostly) declaratively generates a version.h bit which > combines all of the FTM logic across all headers together. > > This gener

Re: [PATCH 2/2] libstdc++: Replace all manual FTM definitions and use

2023-06-01 Thread Jonathan Wakely via Gcc-patches
On Sat, 29 Apr 2023 at 11:24, Arsen Arsenović via Libstdc++ < libstd...@gcc.gnu.org> wrote: > libstdc++-v3/ChangeLog: > > * libsupc++/typeinfo: Switch to bits/version.h for > __cpp_lib_constexpr_typeinfo. > > Does this change have an impact on compilation speed? With this change we

Re: [PATCH] Move std::search into algobase.h

2023-06-01 Thread Jonathan Wakely via Gcc-patches
--disable-libgomp > To be continued tomorrow... > > On 01/06/2023 14:05, Jonathan Wakely wrote: > > > > > > On Thu, 1 Jun 2023 at 12:52, Rainer Orth > > wrote: > > > > Jonathan Wakely via Gcc-patches writes: > > > > >

Re: [PATCH] Move std::search into algobase.h

2023-06-02 Thread Jonathan Wakely via Gcc-patches
On Fri, 2 Jun 2023 at 08:33, François Dumont wrote: > I haven't been able to reproduce so far. > > Here is however a patch that I think will fix the problem. At least > failing tests are UNRESOLVED on my system. > > libstdc++: Fix broken _GLIBCXX_PARALLEL mode > > Add missing include in .

Re: [PATCH] Move std::search into algobase.h

2023-06-02 Thread Jonathan Wakely via Gcc-patches
On Fri, 2 Jun 2023 at 10:47, François Dumont wrote: > Ok, push done. > Thanks. > Even after full rebuild those tests are still UNRESOLVED on my system. > What is the error in the log? What is your system? How and where did you install "OMP"? Does the libgomp directory exist in the GCC build

Re: [PATCH] libstdc++: Correct NTTP and simd_mask ctor call

2023-06-02 Thread Jonathan Wakely via Gcc-patches
On Fri, 2 Jun 2023 at 10:30, Alexandre Oliva via Libstdc++ < libstd...@gcc.gnu.org> wrote: > > ISTM that rtems is missing some of the math.h functions expected by > libstdc++, but also that even those that are present are not visible in > namespace ::std::, where the macros reasonably expect to fi

Re: [PATCH] Move std::search into algobase.h

2023-06-02 Thread Jonathan Wakely via Gcc-patches
On Fri, 2 Jun 2023 at 12:30, Jonathan Wakely wrote: > > > On Fri, 2 Jun 2023 at 10:47, François Dumont wrote: > >> Ok, push done. >> > > Thanks. > > >> Even after full rebuild those tests are still UNRESOLVED on my system. >> > What is the error in the log? > > What is your system? How and where

Re: [PATCH] libstdc++: Do not assume existence of char8_t codecvt facet

2023-06-02 Thread Jonathan Wakely via Gcc-patches
On Fri, 2 Jun 2023 at 16:45, Joseph Faulls wrote: > It is not required that codecvt facet be > supported by > > the locale, nor is it added as part of the default locale. This can lead to > > dangerous behaviour when static_cast. > Ouch, yes indeed. I don't know why I added that there. Thanks for

Re: [PATCH v2 1/2] libstdc++: also use sendfile for big files

2023-06-06 Thread Jonathan Wakely via Gcc-patches
On Wed, 22 Mar 2023 at 12:14, Jonathan Wakely wrote: > > > On Mon, 20 Mar 2023 at 22:30, Jonathan Wakely via Libstdc++ < > libstd...@gcc.gnu.org> wrote: > >> On 20/03/23 22:27 +, Jonathan Wakely wrote: >> >On 06/03/23 20:52 +0100, Jannik Glückert wrote: >> >>we were previously only using send

Re: [PATCH v2 1/2] libstdc++: also use sendfile for big files

2023-06-06 Thread Jonathan Wakely via Gcc-patches
On Wed, 22 Mar 2023 at 12:18, Jonathan Wakely wrote: > On Wed, 22 Mar 2023 at 12:14, Jonathan Wakely wrote: > >> >> >> On Mon, 20 Mar 2023 at 22:30, Jonathan Wakely via Libstdc++ < >> libstd...@gcc.gnu.org> wrote: >> >>> On 20/03/23 22:27 +, Jonathan Wakely wrote: >>> >On 06/03/23 20:52 +0100

Re: [PATCH v2 1/2] libstdc++: also use sendfile for big files

2023-06-06 Thread Jonathan Wakely via Gcc-patches
On Wed, 22 Mar 2023 at 12:20, Jonathan Wakely wrote: > On Wed, 22 Mar 2023 at 12:18, Jonathan Wakely wrote: > >> On Wed, 22 Mar 2023 at 12:14, Jonathan Wakely wrote: >> >>> >>> >>> On Mon, 20 Mar 2023 at 22:30, Jonathan Wakely via Libstdc++ < >>> libstd...@gcc.gnu.org> wrote: >>> On 20/03/23

[committed] libstdc++: Use close-on-exec for file descriptors in filesystem::copy_file

2023-06-06 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux. Pushed to trunk. This is worth backporting. -- >8 -- libstdc++-v3/ChangeLog: * src/filesystem/ops-common.h (do_copy_file) [O_CLOEXEC]: Set close-on-exec flag on file descriptors. --- libstdc++-v3/src/filesystem/ops-common.h | 13 +++-- 1 file changed

Re: [PATCH] libstdc++: Do not assume existence of char8_t codecvt facet

2023-06-06 Thread Jonathan Wakely via Gcc-patches
On Fri, 2 Jun 2023 at 17:52, Jonathan Wakely wrote: > On Fri, 2 Jun 2023 at 16:45, Joseph Faulls wrote: > >> It is not required that codecvt facet be >> supported by >> >> the locale, nor is it added as part of the default locale. This can lead >> to >> >> dangerous behaviour when static_cast. >>

[committed] libstdc++: Fix ambiguous expression in std::array::front() [PR110139]

2023-06-06 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux. Pushed to trunk. Backport needed for gcc-13 too. -- >8 -- For 32-bit targets using -pedantic (or using Clang) makes the expression _M_elems[0] ambiguous. The overloaded operator[] that we want to call has a size_t parameter, but 0 is type ptrdiff_t for many ILP32 targets, so

Re: [PATCH] libstdc++: Replace use of incorrect non-temporal store

2023-06-06 Thread Jonathan Wakely via Gcc-patches
On Tue, 6 Jun 2023 at 13:26, Matthias Kretz via Libstdc++ < libstd...@gcc.gnu.org> wrote: > OK for master and backports? > OK for trunk and branches > Tested on x86_64-pc-linux-gnu > > - >8 - > > The call to the base implementation sometimes didn't find a matching > signature because t

Re: [PATCH] libstdc++: Avoid vector casts while still avoiding PR90424

2023-06-06 Thread Jonathan Wakely via Gcc-patches
On Tue, 6 Jun 2023 at 13:34, Matthias Kretz via Libstdc++ < libstd...@gcc.gnu.org> wrote: > This is the first part of a fix for the failure of the new simd test on > non- > VSX POWER targets. There are more casts to unavailable vectors of 64-bit > element types to be rewritten. > > OK for master a

Re: [PATCH] libstdc++: Use AS_IF in configure.ac

2023-06-06 Thread Jonathan Wakely via Gcc-patches
On Thu, 1 Jun 2023 at 16:59, Jonathan Wakely via Libstdc++ < libstd...@gcc.gnu.org> wrote: > Tested x86_64-linux. I'd appreciate a second set of eyeballs on this > before I push it. > Pushed to trunk now. > > -- >8 -- > > This ensures that anything that depends on AC_REQUIRE is hoisted out of

Re: [PATCH] libstdc++: Rewrite or avoid casts to 64-bit element types

2023-06-06 Thread Jonathan Wakely via Gcc-patches
On Tue, 6 Jun 2023 at 15:14, Matthias Kretz via Libstdc++ < libstd...@gcc.gnu.org> wrote: > Last part to resolve test failure introduced with PR109822. > > OK for master and backports (gcc-11 doesn't have __builtin_shufflevector, > though)? > Yep, OK. > > Tested on x86_64-pc-linux-gnu and powe

[committed] libstdc++: Make std::numeric_limits<__float128> more portable [PR104772]

2023-06-06 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux and powerpc64le-linux. Pushed to trunk. -- >8 -- This redefines std::numeric_limits<__float128> so that it works with non-GCC compilers. The previous definition didn't work with Clang, due to it not supporting __builtin_high_valq, __builtin_nanq, and __builtin_nansq. It also d

[committed] libstdc++: Update list of known symbol versions for abi-check

2023-06-06 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux and powerpc64le-linux. Pushed to trunk. -- >8 -- Add the recently added CXXABI_1.3.15 version. Also remove two "frozen" versions from the latestp list, as no more symbols should be added to those now. libstdc++-v3/ChangeLog: * testsuite/util/testsuite_abi.cc (check_v

Re: [committed] libstdc++: Update list of known symbol versions for abi-check

2023-06-07 Thread Jonathan Wakely via Gcc-patches
On Wed, 7 Jun 2023 at 05:43, François Dumont wrote: > > On 06/06/2023 17:59, Jonathan Wakely via Libstdc++ wrote: > > Tested x86_64-linux and powerpc64le-linux. Pushed to trunk. > > > > -- >8 -- > > > > Add the recently added CXXABI_1.3.15 version. Also remove two "frozen" > > versions from the la

Re: Support 'UNSUPPORTED: [...]: exception handling disabled' for libstdc++ testing (was: Support in the GCC(/C++) test suites for '-fno-exceptions')

2023-06-07 Thread Jonathan Wakely via Gcc-patches
On Wed, 7 Jun 2023 at 08:13, Thomas Schwinge wrote: > Hi! > > On 2023-06-06T20:31:21+0100, Jonathan Wakely wrote: > > On Tue, 6 Jun 2023 at 20:14, Thomas Schwinge > > wrote: > >> This issue comes up in context of me working on C++ support for GCN and > >> nvptx target. Those targets shall defau

Re: Support 'UNSUPPORTED: [...]: exception handling disabled' for libstdc++ testing (was: Support in the GCC(/C++) test suites for '-fno-exceptions')

2023-06-07 Thread Jonathan Wakely via Gcc-patches
On Wed, 7 Jun 2023 at 10:08, Thomas Schwinge wrote: > Hi! > > On 2023-06-07T09:12:31+0100, Jonathan Wakely wrote: > > On Wed, 7 Jun 2023 at 08:13, Thomas Schwinge wrote: > >> On 2023-06-06T20:31:21+0100, Jonathan Wakely > wrote: > >> > On Tue, 6 Jun 2023 at 20:14, Thomas Schwinge > > >> > wrot

Re: [PATCH] libstdc++: Use AS_IF in configure.ac

2023-06-07 Thread Jonathan Wakely via Gcc-patches
On Wed, 7 Jun 2023 at 15:42, Hans-Peter Nilsson wrote: > > Date: Tue, 6 Jun 2023 16:30:12 +0100 > > From: Jonathan Wakely via Gcc-patches > > > On Thu, 1 Jun 2023 at 16:59, Jonathan Wakely via Libstdc++ < > > libstd...@gcc.gnu.org> wrote: > > > > &

Re: [PATCH] libstdc++: Use AS_IF in configure.ac

2023-06-07 Thread Jonathan Wakely via Gcc-patches
On Wed, 7 Jun 2023 at 15:54, Jonathan Wakely wrote: > > > On Wed, 7 Jun 2023 at 15:42, Hans-Peter Nilsson wrote: > >> > Date: Tue, 6 Jun 2023 16:30:12 +0100 >> > From: Jonathan Wakely via Gcc-patches >> >> > On Thu, 1 Jun 2023 at 16:59

[committed] libstdc++: Fix some tests that fail with -fexcess-precision=standard

2023-06-07 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux (-m32/-m64) and powerpc64le-linux. Pushed to trunk. -- >8 -- libstdc++-v3/ChangeLog: * testsuite/20_util/duration/cons/2.cc: Use values that aren't affected by rounding. * testsuite/20_util/from_chars/5.cc: Cast arithmetic result to double befo

[committed] libstdc++: Fix some tests that fail with -fno-exceptions

2023-06-07 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux (-m32/-m64) and powerpc64le-linux. Pushed to trunk. -- >8 -- libstdc++-v3/ChangeLog: * testsuite/18_support/nested_exception/rethrow_if_nested-term.cc: Require effective target exceptions_enabled instead of using dg-skip-if. * testsuite/23_cont

[committed] libstdc++: Restore accidentally removed version in abi-check

2023-06-07 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux (-m32/-m64) and powerpc64le-linux. Pushed to trunk. -- >8 -- In r14-1583-g192665feef7129 I meant to add CXXABI_1.3.15 but instead I replaced CXXABI_1.3.14 with it. This restores the CXXABI_1.3.14 version. libstdc++-v3/ChangeLog: * testsuite/util/testsuite_abi.cc (che

Re: [committed] libstdc++: Update list of known symbol versions for abi-check

2023-06-07 Thread Jonathan Wakely via Gcc-patches
On Wed, 7 Jun 2023 at 09:06, Jonathan Wakely wrote: > On Wed, 7 Jun 2023 at 05:43, François Dumont wrote: > >> >> On 06/06/2023 17:59, Jonathan Wakely via Libstdc++ wrote: >> > Tested x86_64-linux and powerpc64le-linux. Pushed to trunk. >> > >> > -- >8 -- >> > >> > Add the recently added CXXABI_1

Re: Support 'UNSUPPORTED: [...]: exception handling disabled' for libstdc++ testing (was: Support in the GCC(/C++) test suites for '-fno-exceptions')

2023-06-07 Thread Jonathan Wakely via Gcc-patches
On Wed, 7 Jun 2023 at 12:51, Jonathan Wakely wrote: > > > On Wed, 7 Jun 2023 at 10:08, Thomas Schwinge > wrote: > >> Hi! >> >> On 2023-06-07T09:12:31+0100, Jonathan Wakely wrote: >> > On Wed, 7 Jun 2023 at 08:13, Thomas Schwinge wrote: >> >> On 2023-06-06T20:31:21+0100, Jonathan Wakely >> wrot

Re: [PATCH] libstdc++: Use AS_IF in configure.ac

2023-06-07 Thread Jonathan Wakely via Gcc-patches
On Wed, 7 Jun 2023 at 16:19, Andreas Schwab wrote: > On Jun 07 2023, Jonathan Wakely via Gcc-patches wrote: > > > Let's just revert it then. The manual says we should use AS_IF, but what > we > > had previously was working well enough. I'll figure out what happene

Re: [PATCH] libstdc++: Fix up 20_util/to_chars/double.cc test for excess precision [PR110145]

2023-06-07 Thread Jonathan Wakely via Gcc-patches
On Wed, 7 Jun 2023, 18:17 Jakub Jelinek via Libstdc++, < libstd...@gcc.gnu.org> wrote: > Hi! > > This test apparently contains 3 problematic floating point constants, > 1e126, 4.91e-6 and 5.547e-6. These constants suffer from double rounding > when -fexcess-precision=standard evaluates double con

Re: [PATCH] libstdc++: Fix up 20_util/to_chars/double.cc test for excess precision [PR110145]

2023-06-07 Thread Jonathan Wakely via Gcc-patches
On Wed, 7 Jun 2023 at 18:26, Jonathan Wakely wrote: > > > On Wed, 7 Jun 2023, 18:17 Jakub Jelinek via Libstdc++, < > libstd...@gcc.gnu.org> wrote: > >> Hi! >> >> This test apparently contains 3 problematic floating point constants, >> 1e126, 4.91e-6 and 5.547e-6. These constants suffer from doub

Re: [committed] libstdc++: Fix code size regressions in std::vector [PR110060]

2023-06-08 Thread Jonathan Wakely via Gcc-patches
On Thu, 8 Jun 2023 at 09:58, Maxim Kuvyrkov wrote: > Hi Jonathan, > > Interestingly, this increases code-size of -O3 code on aarch64-linux-gnu > on SPEC CPU2017's 641.leela_s benchmark [1]. > > In particular, FastBoard::get_nearby_enemies() grew from 1444 to 2212 > bytes. This seems like a corne

Re: [committed] libstdc++: Fix code size regressions in std::vector [PR110060]

2023-06-08 Thread Jonathan Wakely via Gcc-patches
if I can > post its compiled and/or preprocessed code publicly. I assume RedHat has > SPEC CPU2017 license, and I can post details to you privately. > > Kind regards, > > -- > Maxim Kuvyrkov > https://www.linaro.org > > > > > > On Jun 1, 2023, at 19:09,

Re: [PATCH RFC] c++: use __cxa_call_terminate for MUST_NOT_THROW [PR97720]

2023-06-08 Thread Jonathan Wakely via Gcc-patches
On Fri, 26 May 2023 at 10:58, Jonathan Wakely wrote: > > > On Wed, 24 May 2023 at 19:56, Jason Merrill via Libstdc++ < > libstd...@gcc.gnu.org> wrote: > >> Middle-end folks: any thoughts about how best to make the change >> described in >> the last paragraph below? >> >> Library folks: any thought

[committed] libstdc++: Improve tests for emplace member of sequence containers

2023-06-09 Thread Jonathan Wakely via Gcc-patches
I'm fairly confident these emplace member functions work correctly, but it's still nice to actually test them! Tested powerpc64le-linux. Pushed to trunk. -- >8 -- Our existing tests for std::deque::emplace, std::list::emplace and std::vector::emplace are poor. We only have compile tests for PR 5

Re: [PATCH RFC] c++: use __cxa_call_terminate for MUST_NOT_THROW [PR97720]

2023-06-09 Thread Jonathan Wakely via Gcc-patches
On Fri, 9 Jun 2023 at 10:03, Richard Biener wrote: > On Thu, Jun 8, 2023 at 3:14 PM Jonathan Wakely via Gcc-patches > wrote: > > > > On Fri, 26 May 2023 at 10:58, Jonathan Wakely wrote: > > > > > > > > > > > On Wed, 24 May 2023 at 19:56, Jason

[committed] libstdc++: Optimize std::to_array for trivial types [PR110167]

2023-06-09 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64le-linux. Pushed to trunk. This makes sense to backport after some soak time on trunk. -- >8 -- As reported in PR libstdc++/110167, std::to_array compiles extremely slowly for very large arrays. It needs to instantiate a very large specialization of std::index_sequence and then c

[committed] libstdc++: Fix P2510R3 "Formatting pointers" [PR110149]

2023-06-09 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64le-linux. Pushed to trunk. I'll backport it to gcc-13 later. -- >8 -- I had intended to support the P2510R3 proposal unconditionally in C++20 mode, but I left it half implemented. The parse function supported the new extensions, but the format function didn't. This adds the miss

[committed] libstdc++: Bump library version to libstdc++.so.6.0.33

2023-06-09 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux, powerpc64le-linux, sparcv9-solaris. Pushed to trunk. There's no new GLIBCXX_3.4.33 symbol version yet, because we have nothing to put in it. The bump is because of the new CXXABI_1.3.15 version. -- >8 -- The addition of __cxa_call_terminate@@CXXABI_1.3.15 on trunk means we n

Re: [PATCH RFC] c++: use __cxa_call_terminate for MUST_NOT_THROW [PR97720]

2023-06-09 Thread Jonathan Wakely via Gcc-patches
On Fri, 9 Jun 2023 at 10:09, Jakub Jelinek wrote: > On Fri, Jun 09, 2023 at 11:02:48AM +0200, Richard Biener via Gcc-patches > wrote: > > > Currently both gcc-13 and trunk are at the same library version, > > > libstdc++.so.6.0.32 > > > > > > But with this addition to trunk we need to bump that .

[committed] libstdc++: Add preprocessor checks to [PR100285]

2023-06-09 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux. Pushed to trunk. --> 8-- We can't define endpoints and resolvers without the relevant OS support. If IPPROTO_TCP and IPPROTO_UDP are both udnefined then we won't need basic_endpoint and basic_resovler anyway, so make them depend on those macros. libstdc++-v3/ChangeLog:

[committed] libstdc++: Remove duplicate definition of _Float128 std::from_chars [PR110077]

2023-06-09 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64le-linux, sparc-solaris. Pushed to trunk. -- >8 -- When long double uses IEEE binary128 representation we define the _Float128 overload of std::from_chars inline in . My changes in r14-1431-g7037e7b6e4ac41 cause it to also be defined non-inline in the library, leading to an abi-ch

Re: Splitting up 27_io/basic_istream/ignore/wchar_t/94749.cc (takes too long)

2023-06-09 Thread Jonathan Wakely via Gcc-patches
On Fri, 9 Jun 2023 at 17:20, Hans-Peter Nilsson wrote: > Hi! > > The test 27_io/basic_istream/ignore/wchar_t/94749.cc takes > about 10 minutes to run for cris-elf in the "gdb simulator" > here on my arguably way-past-retirement machine (and it > looks like it gained a minute with LRA). I've seen

Re: [PATCH] (Re: Splitting up 27_io/basic_istream/ignore/wchar_t/94749.cc (takes too long))

2023-06-10 Thread Jonathan Wakely via Gcc-patches
On Sat, 10 Jun 2023, 06:18 Hans-Peter Nilsson via Libstdc++, < libstd...@gcc.gnu.org> wrote: > Thank you for your consideration. (Or is that phrase only used > negatively?) > > > From: Jonathan Wakely > > Date: Fri, 9 Jun 2023 21:40:15 +0100 > > > test01, test02, test03 and test04 should run alm

Re: [PATCH] libstdc++: Clarify manual demangle doc

2023-06-14 Thread Jonathan Wakely via Gcc-patches
On Sat, 10 Jun 2023 at 23:04, Jonny Grant wrote: > > libstdc++-v3/ChangeLog: > > * doc/xml/manual/extensions.xml: Remove demangle exception > description and include. Thanks, pushed to trunk. > > --- > libstdc++-v3/doc/xml/manual/extensions.xml | 6 ++ > 1 file changed, 2 insertions

Re: libstdc++-v3: do not duplicate some math functions when using newlib

2023-06-15 Thread Jonathan Wakely via Gcc-patches
On Thu, 15 Jun 2023, 01:46 Alexandre Oliva via Libstdc++, < libstd...@gcc.gnu.org> wrote: > > Contributing a patch by Joel Brobecker . > Regstrapped on x86_64-linux-gnu just to be sure, also tested with > aarch64-rtems6. I'm going to put this in later this week if there > aren't any objections. >

Re: [libstdc++] [testsuite] xfail dbl from_chars for aarch64 rtems ldbl

2023-06-15 Thread Jonathan Wakely via Gcc-patches
On Thu, 15 Jun 2023, 01:49 Alexandre Oliva via Libstdc++, < libstd...@gcc.gnu.org> wrote: > > rtems, like vxworks, uses fast-float doubles for from_chars even for > long double, so it loses precision, so expect the long double bits to > fail on aarch64. > > Regstrapped on x86_64-linux-gnu, also te

Re: [PATCH 1/2] c++, libstdc++: implement __is_pointer built-in trait

2023-07-12 Thread Jonathan Wakely via Gcc-patches
On Wed, 12 Jul 2023 at 05:41, François Dumont via Libstdc++ wrote: > > > On 10/07/2023 07:23, Ken Matsui via Libstdc++ wrote: > > This patch implements built-in trait for std::is_pointer. > > > > gcc/cp/ChangeLog: > > > > * cp-trait.def: Define __is_pointer. > > * constraint.cc (diagno

Re: [PATCH 1/2] c++, libstdc++: implement __is_pointer built-in trait

2023-07-12 Thread Jonathan Wakely via Gcc-patches
On Mon, 10 Jul 2023 at 06:24, Ken Matsui via Libstdc++ wrote: > > This patch implements built-in trait for std::is_pointer. > > gcc/cp/ChangeLog: > > * cp-trait.def: Define __is_pointer. > * constraint.cc (diagnose_trait_expr): Handle CPTK_IS_POINTER. > * semantics.cc (trai

Re: [PATCH v2 2/2] libstdc++: use new built-in trait __is_scalar for std::is_scalar

2023-07-12 Thread Jonathan Wakely via Gcc-patches
On Sat, 8 Jul 2023 at 05:47, Ken Matsui via Libstdc++ wrote: > > This patch gets std::is_scalar to dispatch to new built-in trait > __is_scalar. > > libstdc++-v3/ChangeLog: > > * include/std/type_traits (is_scalar): Use __is_scalar built-in > trait. > (is_scalar_v): Likewis

Re: [PATCH v2] libstdc++: use __is_enum built-in trait

2023-07-12 Thread Jonathan Wakely via Gcc-patches
On Sat, 8 Jul 2023 at 05:50, Ken Matsui via Libstdc++ wrote: > > This patch replaces is_enum::value with __is_enum built-in trait in > the type_traits header. > > libstdc++-v3/ChangeLog: > > * include/std/type_traits (__make_unsigned_selector): Use > __is_enum built-in trait. >

Re: [PATCH v2 1/2] c++, libstdc++: implement __is_pointer built-in trait

2023-07-12 Thread Jonathan Wakely via Gcc-patches
On Mon, 10 Jul 2023 at 06:51, Ken Matsui via Libstdc++ wrote: > > Hi, > > Here is the benchmark result for is_pointer: > > https://github.com/ken-matsui/gcc-benches/blob/main/is_pointer.md#sun-jul--9-103948-pm-pdt-2023 > > Time: -62.1344% > Peak Memory Usage: -52.4281% > Total Memory Usage: -53.58

Re: [PATCH 2/2] libstdc++: use new built-in trait __is_signed

2023-07-12 Thread Jonathan Wakely via Gcc-patches
On Sun, 9 Jul 2023 at 09:50, Ken Matsui via Libstdc++ wrote: > > This patch lets libstdc++ use new built-in trait __is_signed. > > libstdc++-v3/ChangeLog: > > * include/std/type_traits (is_signed): Use __is_signed built-in trait. > (is_signed_v): Likewise. > > Signed-off-by: Ken Ma

Re: [PATCH v4 2/2] libstdc++: use new built-in trait __is_unsigned

2023-07-12 Thread Jonathan Wakely via Gcc-patches
On Sat, 8 Jul 2023 at 12:14, Ken Matsui via Libstdc++ wrote: > > This patch lets libstdc++ use new built-in trait __is_unsigned. > > libstdc++-v3/ChangeLog: > > * include/std/type_traits (is_unsigned): Use __is_unsigned built-in > trait. > (is_unsigned_v): Likewise. > > Sig

Re: [PATCH v8 2/6] libstdc++: use new built-in trait __is_reference for std::is_reference

2023-07-12 Thread Jonathan Wakely via Gcc-patches
On Sat, 8 Jul 2023 at 06:13, Ken Matsui via Libstdc++ wrote: > > This patch gets std::is_reference to dispatch to new built-in trait > __is_reference. > > libstdc++-v3/ChangeLog: > > * include/std/type_traits (is_reference): Use __is_reference built-in > trait. > (is_refere

Re: [PATCH v8 4/6] libstdc++: use new built-in trait __is_function for std::is_function

2023-07-12 Thread Jonathan Wakely via Gcc-patches
On Sat, 8 Jul 2023 at 06:15, Ken Matsui via Libstdc++ wrote: > > This patch gets std::is_function to dispatch to new built-in trait > __is_function. > > libstdc++-v3/ChangeLog: > > * include/std/type_traits (is_function): Use __is_function built-in > trait. > (is_function_v

Re: [PATCH 1/2] c++, libstdc++: implement __is_signed built-in trait

2023-07-12 Thread Jonathan Wakely via Gcc-patches
On Sun, 9 Jul 2023 at 09:50, Ken Matsui via Libstdc++ wrote: > > This patch implements built-in trait for std::is_signed. > > gcc/cp/ChangeLog: > > * cp-trait.def: Define __is_signed. > * constraint.cc (diagnose_trait_expr): Handle CPTK_IS_SIGNED. > * semantics.cc (trait_ex

Re: [PATCH v2 2/2] libstdc++: use new built-in trait __remove_pointer

2023-07-12 Thread Jonathan Wakely via Gcc-patches
On Sat, 8 Jul 2023 at 06:31, Ken Matsui via Libstdc++ wrote: > > This patch lets libstdc++ use new built-in trait __remove_pointer. > > libstdc++-v3/ChangeLog: > > * include/std/type_traits (remove_pointer): Use __remove_pointer > built-in trait. > > Signed-off-by: Ken Matsui OK for tru

Re: [PATCH v2 2/2] libstdc++: use new built-in trait __is_scalar for std::is_scalar

2023-07-12 Thread Jonathan Wakely via Gcc-patches
On Wed, 12 Jul 2023, 19:33 Ken Matsui via Libstdc++, wrote: > On Wed, Jul 12, 2023 at 2:50 AM Jonathan Wakely > wrote: > > > > On Sat, 8 Jul 2023 at 05:47, Ken Matsui via Libstdc++ > > wrote: > > > > > > This patch gets std::is_scalar to dispatch to new built-in trait > > > __is_scalar. > > > >

[committed] libstdc++: Check conversion from filesystem::path to wide strings [PR95048]

2023-07-12 Thread Jonathan Wakely via Gcc-patches
Tested powerp64le-linux. Pushed to trunk. This can be backported too. -- >8 -- The testcase added for this bug only checks conversion from wide strings on construction, but the fix also covered conversion to wide stings via path::wstring(). Add checks for that, and u16string() and u32string(). l

Re: [PATCH v2 1/2] c++, libstdc++: implement __is_pointer built-in trait

2023-07-13 Thread Jonathan Wakely via Gcc-patches
On Wed, 12 Jul 2023 at 21:42, Ken Matsui wrote: > > On Wed, Jul 12, 2023 at 3:01 AM Jonathan Wakely wrote: > > > > On Mon, 10 Jul 2023 at 06:51, Ken Matsui via Libstdc++ > > wrote: > > > > > > Hi, > > > > > > Here is the benchmark result for is_pointer: > > > > > > https://github.com/ken-matsui/

[committed] libstdc++: std::stoi etc. do not need C99 support [PR110653]

2023-07-13 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64le-linux. Pushed to trunk. -- >8 -- std::stoi, std::stol, std::stoul, and std::stod only depend on C89 functions, so don't need to be guarded by _GLIBCXX_USE_C99_STDLIB std::stoll and std::stoull don't need C99 strtoll and strtoull if sizeof(long) == sizeof(long long). std::stol

Re: [PATCH v2 1/2] c++, libstdc++: implement __is_pointer built-in trait

2023-07-14 Thread Jonathan Wakely via Gcc-patches
On Thu, 13 Jul 2023 at 21:04, Ken Matsui wrote: > > On Thu, Jul 13, 2023 at 2:22 AM Jonathan Wakely wrote: > > > > On Wed, 12 Jul 2023 at 21:42, Ken Matsui wrote: > > > > > > On Wed, Jul 12, 2023 at 3:01 AM Jonathan Wakely > > > wrote: > > > > > > > > On Mon, 10 Jul 2023 at 06:51, Ken Matsui v

Re: [PATCH v2 1/2] c++, libstdc++: implement __is_pointer built-in trait

2023-07-14 Thread Jonathan Wakely via Gcc-patches
On Fri, 14 Jul 2023 at 11:48, Jonathan Wakely wrote: > > On Thu, 13 Jul 2023 at 21:04, Ken Matsui wrote: > > > > On Thu, Jul 13, 2023 at 2:22 AM Jonathan Wakely wrote: > > > > > > On Wed, 12 Jul 2023 at 21:42, Ken Matsui > > > wrote: > > > > > > > > On Wed, Jul 12, 2023 at 3:01 AM Jonathan Wak

[committed 1/3] libstdc++: Check autoconf macros for strtof and strtold [PR110653]

2023-07-19 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux. Pushed to trunk. -- >8 -- As well as the _GLIBCXX_USE_C99_STDLIB check, we also have a separate check in linkage.m4 for just strtof and strtold. We can use that to declare std::strtof and std::strtold in for additional targets. That allows us to enable std::stold on hpux11.1

[committed 3/3] libstdc++: Enable tests for std::stoi etc. unconditionally [PR110653]

2023-07-19 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux. Pushed to trunk. -- >8 -- Since the narrow string versions of std::stoi, std::stol, std::stoul, std::stof and std::stod are now always defined, we don't need to check dg-require-string-conversions in the relevant tests. libstdc++-v3/ChangeLog: PR libstdc++/110653

[committed 2/3] libstdc++: Define std::stof fallback in terms of std::stod [PR110653]

2023-07-19 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux. Pushed to trunk. -- >8 -- For targets without std::strtof we can define std::stof by calling std::stod and then checking if the result is out of range of float. libstdc++-v3/ChangeLog: PR libstdc++/110653 * include/bits/basic_string.h [!_GLIBCXX_HAVE_STRTOF]

  1   2   3   4   5   6   7   8   9   10   >