On 10/02/21 16:58 +, Jonathan Wakely wrote:
This wasn't fixed upstream for mingw-w64 so we still need the
workaround.
libstdc++-v3/ChangeLog:
PR libstdc++/1
* src/c++17/fs_ops.cc (fs::status): Re-enable workaround.
Oops, the same change is needed in symlink_status as w
libstdc++-v3/ChangeLog:
PR libstdc++/99096
* testsuite/util/testsuite_fs.h: Always include .
Tested x86_64-linux. Committed to trunk.
commit 4e3590d06cf8a06fcc460ccda6150483a0311bae
Author: Jonathan Wakely
Date: Sun Feb 14 20:38:32 2021
libstdc++: Restore in testsuite_fs
The once_flag::_M_activate() function is only ever called immediately
after a call to once_flag::_M_passive(), and so in the non-gthreads case
it is impossible for _M_passive() to be true in the body of
_M_activate(). Add a check for it anyway, to avoid warnings about
missing return.
Also replace
The __gthread_yield() function is only defined for gthreads targets, so
check _GLIBCXX_HAS_GTHREADS before using it.
Also reorder __thread_relax and __thread_yield so that the former can
use the latter instead of repeating the same preprocessor checks.
libstdc++-v3/ChangeLog:
* include/b
On 15/02/21 16:13 +, Jonathan Wakely wrote:
The __gthread_yield() function is only defined for gthreads targets, so
check _GLIBCXX_HAS_GTHREADS before using it.
Also reorder __thread_relax and __thread_yield so that the former can
use the latter instead of repeating the same preprocessor che
On 15/02/21 23:22 +, Neven Sajko wrote:
There is a long-standing, but undocumented GCC inline assembly feature
that's part of the extended asm GCC extension to C and C++: extended
asm empty input constraints.
Although I don't really use extended asm much, and I never contributed
to GCC befor
On Mon, 22 Feb 2021, 22:13 Patrick Palka via Libstdc++, <
libstd...@gcc.gnu.org> wrote:
> The logic in std::to_chars for extracting the high- and low-order parts
> of a IBM long double value does the right thing on powerpc64le, but not
> on powerpc64be. This patch makes the extraction endian-agno
libstdc++-v3/ChangeLog:
* testsuite/17_intro/names.cc: Undefine 'u' on powerpc*-linux*.
Tested powerpc64le-linux. Committed to trunk.
commit d0453cf5c68b6aa0e8c57a7a99d4285f047387b7
Author: Jonathan Wakely
Date: Wed Feb 24 16:24:34 2021
libstdc++: Fix failing tests due to 'u' ide
On 23/02/21 11:30 -0500, Patrick Palka via Libstdc++ wrote:
On Mon, 22 Feb 2021, Patrick Palka wrote:
This makes the hexadecimal section of the long double std::to_chars
testcase more robust by avoiding false-negative FAILs due to printf
using a different leading hex digit than us, and by addit
This adds overloads of std::to_chars for powerpc64's __ieee128, so that
std::to_chars can be used for long double when -mabi=ieeelongdouble is
in used.
Eventually we'll want to extend these new overloads to work for
__float128 on all targets that support that type. For now, we're only
doing it for
On 24/02/21 12:04 -0500, Patrick Palka via Libstdc++ wrote:
On Wed, 24 Feb 2021, Jonathan Wakely wrote:
On 23/02/21 11:30 -0500, Patrick Palka via Libstdc++ wrote:
> On Mon, 22 Feb 2021, Patrick Palka wrote:
>
> > This makes the hexadecimal section of the long double std::to_chars
> > testcase
On 24/02/21 17:00 +, Jonathan Wakely via Libstdc++ wrote:
libstdc++: Define std::to_chars overloads for __ieee128 [PR 98389]
This adds overloads of std::to_chars for powerpc64's __ieee128, so that
std::to_chars can be used for long double when -mabi=ieeelongdouble is
in used.
On 23/02/21 13:24 +, Cassio Neri via Libstdc++ wrote:
This patch reimplements std::chrono::year_month_day::_S_from_days() which
retrieves a date from the number of elapsed days since 1970/01/01. The new
implementation is based on Proposition 6.3 of Neri and Schneider, "Euclidean
Affine Funct
On 23/02/21 16:18 +0100, Andreas Schwab wrote:
libstdc++-v3/
* config/abi/post/aarch64-linux-gnu/baseline_symbols.txt: Update.
* config/abi/post/ia64-linux-gnu/baseline_symbols.txt: Update.
* config/abi/post/m68k-linux-gnu/baseline_symbols.txt: Update.
* config/abi
On 23/02/21 23:13 +0100, Matthias Kretz wrote:
I like the idea.
On Dienstag, 23. Februar 2021 14:25:10 CET Cassio Neri via Libstdc++ wrote:
((__m ^ (__m >> 3)) & 1) | 30
Note that you can drop the `& 1` part. 30 in binary is 0b0. ORing with a
value in [0, 0b01101] will only toggle the las
On 24/02/21 17:14 -0500, Patrick Palka via Libstdc++ wrote:
The code path in __floating_to_chars_precision for handling long double
by going through printf now also handles __float128, so the condition
that guards this code path needs to be updated accordingly.
Tested on x86_64-pc-linux-gnu (i.e
On 24/02/21 17:00 +, Jonathan Wakely via Libstdc++ wrote:
@@ -815,6 +852,39 @@ template
return result;
}
+namespace
+{
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wabi"
+ template
+ inline int
+ sprintf_ld(char* buffer, const char* format_string, T value, Extra...
Implement P1682R2 as just approved for C++23.
libstdc++-v3/ChangeLog:
* include/std/utility (to_underlying): Define.
* include/std/version (__cpp_lib_to_underlying): Define.
* testsuite/20_util/to_underlying/1.cc: New test.
* testsuite/20_util/to_underlying/version
On 24/02/21 17:28 +, Jonathan Wakely wrote:
On 23/02/21 13:24 +, Cassio Neri via Libstdc++ wrote:
This patch reimplements std::chrono::year_month_day::_S_from_days() which
retrieves a date from the number of elapsed days since 1970/01/01. The new
implementation is based on Proposition 6
Pushed to wwwdocs.
commit 86937d6dfe04c81c805cfc321c62a520dfd2a59f
Author: Jonathan Wakely
Date: Thu Feb 25 12:54:45 2021 +
Document new libstdc++ features
diff --git a/htdocs/gcc-11/changes.html b/htdocs/gcc-11/changes.html
index de75b8d6..6a47b0b8 100644
--- a/htdocs/gcc-11/changes
On 25/02/21 13:46 +, Cassio Neri via Libstdc++ wrote:
Hi Jonathan,
The issue is that I didn't cast __dp.count() to uint32_t:
- const auto __r0 = __dp.count() + __r2_e3;
+ const auto __r0 = static_cast(__dp.count()) + __r2_e3;
The above would be a better fix. Indeed, __r0 belongs
On 25/02/21 14:02 +, Jonathan Wakely wrote:
On 25/02/21 13:46 +, Cassio Neri via Libstdc++ wrote:
Hi Jonathan,
The issue is that I didn't cast __dp.count() to uint32_t:
- const auto __r0 = __dp.count() + __r2_e3;
+ const auto __r0 = static_cast(__dp.count()) + __r2_e3;
The a
libstdc++-v3/ChangeLog:
* doc/xml/manual/abi.xml: Document versioning for GCC 11.
* doc/html/manual/abi.html: Regenerate.
Committed to trunk.
commit ed255fd5eda5e2530779bb69b8805c916ddfe0c2
Author: Jonathan Wakely
Date: Thu Feb 25 14:09:40 2021
libstdc++: Document library
libstdc++-v3/ChangeLog:
PR libstdc++/99270
* testsuite/27_io/headers/cstdio/types_std.cc: Use pointer to
FILE instead of FILE.
Tested x86_64-linux. Committed to trunk.
commit 31002af9040876dfb6444fabd524b11ca0739519
Author: Jonathan Wakely
Date: Thu Feb 25 15:31:19 202
On 25/02/21 14:19 +, Jonathan Wakely wrote:
On 25/02/21 14:02 +, Jonathan Wakely wrote:
On 25/02/21 13:46 +, Cassio Neri via Libstdc++ wrote:
Hi Jonathan,
The issue is that I didn't cast __dp.count() to uint32_t:
- const auto __r0 = __dp.count() + __r2_e3;
+ const auto _
On 27/02/21 12:42 +0100, Hans-Peter Nilsson via Libstdc++ wrote:
Since 97d6161f6a7fa712 / r11-7370 "libstdc++: More efficient
days from date" I see an additional 81 testsuite-errors for
cris-elf, with this in g++.log for one randomly picked
regressing test:
FAIL: g++.dg/cpp1y/pr57640.C -std=c++
On 03/03/21 13:29 +0100, Rainer Orth wrote:
The following patch updates the Solaris baselines for GCC 11.1. There's
only one caveat: comparing the Solaris 11.3 and 11.4 baselines, I find
+FUNC:_ZSt10from_charsPKcS0_RdSt12chars_format@@GLIBCXX_3.4.29
+FUNC:_ZSt10from_charsPKcS0_ReSt12chars_forma
On 26/02/21 07:59 -0800, Thiago Macieira via Libstdc++ wrote:
ints can be used as futex on Linux. ptrdiff_t on 64-bit Linux can't.
Yes, we should do this for GCC 11.
libstdc++-v3/include/std/latch | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libstdc++-v3/include/std
On 26/02/21 07:59 -0800, Thiago Macieira via Libstdc++ wrote:
The kernel doesn't care what we store in those 32 bits, only that they are
comparable. This commit adds:
* pointers and long on 32-bit architectures
* unsigned
* untyped enums and typed enums on int & unsigned int
* float
We're not us
On 26/02/21 07:59 -0800, Thiago Macieira via Libstdc++ wrote:
Our thread's ID does not change so we don't have to get it every time
and hash it every time.
This looks good for GCC 11.
(This one wouldn't be an ABI break to change later, but we might as
well do it now, as we have the patch now).
On 01/03/21 09:56 +0100, Richard Biener via Libstdc++ wrote:
On Sun, Feb 28, 2021 at 10:53 PM Hans-Peter Nilsson wrote:
On Fri, 26 Feb 2021, Thiago Macieira via Gcc-patches wrote:
> On Friday, 26 February 2021 11:31:00 PST Andreas Schwab wrote:
> > On Feb 26 2021, Thiago Macieira wrote:
> >
On 03/03/21 14:56 +, Jonathan Wakely wrote:
On 01/03/21 09:56 +0100, Richard Biener via Libstdc++ wrote:
On Sun, Feb 28, 2021 at 10:53 PM Hans-Peter Nilsson wrote:
On Fri, 26 Feb 2021, Thiago Macieira via Gcc-patches wrote:
On Friday, 26 February 2021 11:31:00 PST Andreas Schwab wrote
On 23/02/21 13:57 -0800, Thomas Rodgers wrote:
diff --git a/libstdc++-v3/include/bits/atomic_wait.h
b/libstdc++-v3/include/bits/atomic_wait.h
index 1a0f0943ebd..fa83ef6c231 100644
--- a/libstdc++-v3/include/bits/atomic_wait.h
+++ b/libstdc++-v3/include/bits/atomic_wait.h
@@ -39,17 +39,16 @@
#inc
On 03/03/21 14:34 +, Jonathan Wakely wrote:
On 26/02/21 07:59 -0800, Thiago Macieira via Libstdc++ wrote:
The kernel doesn't care what we store in those 32 bits, only that they are
comparable. This commit adds:
* pointers and long on 32-bit architectures
* unsigned
* untyped enums and typed
On 03/03/21 09:14 -0800, Thiago Macieira via Libstdc++ wrote:
On Wednesday, 3 March 2021 06:34:26 PST Jonathan Wakely wrote:
On 26/02/21 07:59 -0800, Thiago Macieira via Libstdc++ wrote:
>ints can be used as futex on Linux. ptrdiff_t on 64-bit Linux can't.
Yes, we should do this for GCC 11.
W
On 23/02/21 13:57 -0800, Thomas Rodgers wrote:
From: Thomas Rodgers
* This revises the previous version to fix std::__condvar::wait_until() usage.
This is a substantial rewrite of the atomic wait/notify (and timed wait
counterparts) implementation.
The previous __platform_wait looped on EINTR
On 03/03/21 19:34 +0200, Ville Voutilainen wrote:
On Wed, 3 Mar 2021 at 19:25, Jonathan Wakely via Libstdc++
wrote:
Oh, except that is_scalar is surprisingly expensive to instantiate
(its defined in a really expensive way) and since we control all uses
I'll be more than happy to write you an
This seems to be a typo/thinko in the definition of the arrays used as
storage.
libstdc++-v3/ChangeLog:
PR libstdc++/99382
*
testsuite/20_util/specialized_algorithms/uninitialized_default_n/sizes.cc:
Make storage larger than required. Verify no write to the last
e
Committed to wwwdocs.
commit ed1a8d0621f5f5dee4d869393b9155f475d360f7
Author: Jonathan Wakely
Date: Thu Mar 4 20:51:52 2021 +
Add to libstdc++ header dependency changes
diff --git a/htdocs/gcc-11/porting_to.html b/htdocs/gcc-11/porting_to.html
index 83227c74..4d27c163 100644
--- a/ht
On Fri, 5 Mar 2021, 22:32 Jakub Jelinek via Libstdc++, <
libstd...@gcc.gnu.org> wrote:
> Hi!
>
> As can be seen on:
> #include
>
> unsigned char f1 (unsigned char x, int y) { return std::rotl (x, y); }
> unsigned char f2 (unsigned char x, int y) { return std::rotr (x, y); }
> unsigned short f3 (u
On 08/03/21 14:35 +0800, Chen Li wrote:
When execute libstdc++ testcases on mips, I notice that last_write_time
alawys failed, and the failed VERIFY is "VERIFY(
approx_equal(last_write_time(f.path), time) );" where testing time before
than epoch.
Below is the minimal case:
```
// gcc a.c
int
When the comparison with a nullptr_t is ill-formed, there is an
additional error for C++11 mode due to the constexpr function body being
invalid.
Signed-off-by: Jonathan Wakely
libstdc++-v3/ChangeLog:
* testsuite/20_util/tuple/comparison_operators/overloaded2.cc:
Add dg-error fo
On 30/07/21 18:13 +0100, Jonathan Wakely wrote:
This adds a configure check for the GNU extension secure_getenv and then
uses it for looking up TMPDIR and similar variables.
Signed-off-by: Jonathan Wakely
libstdc++-v3/ChangeLog:
PR libstdc++/65018
* configure.ac: Check for sec
std::wstring_convert and std::wbuffer_convert types are not copyable or
movable, and store a plain pointer without a deleter. That means a much
simpler type that just uses delete in its destructor can be used instead
of std::unique_ptr.
That avoids including and parsing all of in every
header tha
This reduces the size of a little. This is one of the largest
and slowest headers in the library.
By using and instead of
we don't need to parse all the parallel algorithms and
std::ranges:: algorithms that are not needed by . Similarly, by
using and instead of we don't
need to parse the de
This change adds options to tests that explicitly use deprecated
features, so that -D_GLIBCXX_USE_DEPRECATED=0 can be used to run the
rest of the testsuite. The tests that explicitly/intentionally use
deprecated features will still be able to use them, but they can be
disabled for the majority of t
The std::random_shuffle algorithm was removed in C++14 (without
deprecation). This adds the deprecated attribute for C++14 and later, so
that users are warned they should not be using it in those dialects.
Signed-off-by: Jonathan Wakely
libstdc++-v3/ChangeLog:
* doc/xml/manual/evolution
Signed-off-by: Jonathan Wakely
libstdc++-v3/ChangeLog:
* testsuite/20_util/function_objects/binders/3113.cc: Remove
trailing whitespace.
* testsuite/20_util/shared_ptr/assign/auto_ptr.cc: Likewise.
* testsuite/20_util/shared_ptr/assign/auto_ptr_neg.cc: Likewise.
This adds a partial specialization of allocator_traits, similar to what
was already done for std::allocator. This means that most uses of
polymorphic_allocator via the traits can avoid the metaprogramming
overhead needed to deduce the properties from polymorphic_allocator.
In addition, I'm changin
Signed-off-by: Jonathan Wakely
libstdc++-v3/ChangeLog:
* testsuite/util/testsuite_common_types.h: Replace uses of
tr1::unordered_map and tr1::unordered_set with their C++11
equivalents.
* testsuite/29_atomics/atomic/cons/assign_neg.cc: Adjust
dg-error line
In C++17 the out-of-class definitions for static constexpr variables are
redundant, because they are implicitly inline. This change avoids
"redundant redeclaration" warnings from -Wsystem-headers -Wdeprecated.
Signed-off-by: Jonathan Wakely
libstdc++-v3/ChangeLog:
* include/bits/random.
On Mon, 2 Aug 2021 at 14:29, Maged Michael wrote:
>
> This is the right patch. The previous one is missing noexcept. Sorry.
>
>
> On Mon, Aug 2, 2021 at 9:23 AM Maged Michael wrote:
>>
>> Please find attached an updated patch after incorporating Jonathan's
>> suggestions.
>>
>> Changes from the l
This adds [[nodiscard]] throughout , as proposed by P2377R0
(with some minor corrections).
The attribute is added for all modes from C++11 up, using
[[__nodiscard__]] or _GLIBCXX_NODISCARD where C++17 [[nodiscard]] can't
be used directly.
commit 240b01b0215f9e46ecf04267c8a3faeb19d4fe3c
Author: J
... and container adaptors.
This adds the [[nodiscard]] attribute to functions with no side-effects
for the sequence containers and their iterators, and the debug versions
of those containers, and the container adaptors,
Tested powerpc64le-linux, committed to trunk.
commit 0d04fe49239d9178785
On 04/08/21 12:56 +0100, Jonathan Wakely wrote:
... and container adaptors.
This adds the [[nodiscard]] attribute to functions with no side-effects
for the sequence containers and their iterators, and the debug versions
of those containers, and the container adaptors,
I don't plan to add any m
On Tue, 3 Aug 2021 at 21:59, Jonathan Wakely wrote:
>
> On Mon, 2 Aug 2021 at 14:29, Maged Michael wrote:
> >
> > This is the right patch. The previous one is missing noexcept. Sorry.
> >
> >
> > On Mon, Aug 2, 2021 at 9:23 AM Maged Michael
> > wrote:
> >>
> >> Please find attached an updated pat
On Wed, 4 Aug 2021 at 16:47, Maged Michael wrote:
>
> Thanks, Jonathan!
>
> On Wed, Aug 4, 2021 at 11:32 AM Jonathan Wakely wrote:
>>
>> On Tue, 3 Aug 2021 at 21:59, Jonathan Wakely wrote:
>> >
>> > On Mon, 2 Aug 2021 at 14:29, Maged Michael wrote:
>> > >
>> > > This is the right patch. The previ
On Wed, 4 Aug 2021 at 18:19, Maged Michael wrote:
>
> Sorry. I totally missed the rest of your message and the patch. My fuzzy
> eyesight, which usually guesses correctly 90% of the time, mistook "Secondly"
> on a line by itself for "Sincerely" :-)
:-)
> The noinlining was based on looking at g
On 04/08/21 12:55 +0100, Jonathan Wakely wrote:
This adds [[nodiscard]] throughout , as proposed by P2377R0
(with some minor corrections).
The attribute is added for all modes from C++11 up, using
[[__nodiscard__]] or _GLIBCXX_NODISCARD where C++17 [[nodiscard]] can't
be used directly.
This ch
On Thu, 5 Aug 2021 at 13:14, Ville Voutilainen
wrote:
>
> On Thu, 5 Aug 2021 at 15:11, Christophe Lyon via Libstdc++
> wrote:
> >
> > Hi Jonathan,
> >
> > On Wed, Aug 4, 2021 at 2:04 PM Jonathan Wakely via Gcc-patches <
> > gcc-patches@gcc.gnu.org
On 04/08/21 13:00 +0100, Jonathan Wakely wrote:
On 04/08/21 12:56 +0100, Jonathan Wakely wrote:
... and container adaptors.
This adds the [[nodiscard]] attribute to functions with no side-effects
for the sequence containers and their iterators, and the debug versions
of those containers, and th
On 05/08/21 15:19 +0100, Jonathan Wakely wrote:
On 04/08/21 12:55 +0100, Jonathan Wakely wrote:
This adds [[nodiscard]] throughout , as proposed by P2377R0
(with some minor corrections).
The attribute is added for all modes from C++11 up, using
[[__nodiscard__]] or _GLIBCXX_NODISCARD where C++1
On 05/08/21 15:40 +0100, Jonathan Wakely wrote:
On 05/08/21 15:19 +0100, Jonathan Wakely wrote:
On 04/08/21 12:55 +0100, Jonathan Wakely wrote:
This adds [[nodiscard]] throughout , as proposed by P2377R0
(with some minor corrections).
The attribute is added for all modes from C++11 up, using
[
On 05/08/21 19:02 +0100, Jonathan Wakely wrote:
On 05/08/21 15:40 +0100, Jonathan Wakely wrote:
On 05/08/21 15:19 +0100, Jonathan Wakely wrote:
On 04/08/21 12:55 +0100, Jonathan Wakely wrote:
This adds [[nodiscard]] throughout , as proposed by P2377R0
(with some minor corrections).
The attrib
On Sun, 8 Aug 2021, 03:42 Hans-Peter Nilsson, wrote:
> A simulator can easily spend more than 10 minutes running this
> test-case, and the default timeout is at 5 minutes. Better allow
> even slower machines; use 4 as the factor.
>
> Regarding relative runtime numbers (very local; mmixware simula
On Sun, 8 Aug 2021, 20:26 François Dumont via Libstdc++, <
libstd...@gcc.gnu.org> wrote:
> This is a trivial fix following a recent change on __glibcxx_assert.
>
> libstdc++: Fix dg-prune-output assertion message
>
> Since __glibcxx_assert changes in r6b42b5a the generated assertion
> me
On Mon, 9 Aug 2021 at 10:51, Stephan Bergmann via Libstdc++
wrote:
>
> Not sure why I started to experience this now with a recent
> GCC/libstdc++ trunk build:
>
> > $ cat test.cc
> > #include
>
> > $ gcc/trunk/inst/bin/g++ -D_GLIBCXX_DEBUG -fsyntax-only test.cc
> > In file included from
> > /ho
On Mon, 9 Aug 2021 at 11:26, François Dumont via Libstdc++
wrote:
>
> Some newly introduced tests in
> 23_containers/unordered_map/cons/default.cc revealed that we are forcing
> the allocator type to have a operator==.
All allocators are required to have operator== so that should not be a
problem
On Mon, 9 Aug 2021 at 11:33, Jonathan Wakely wrote:
>
> On Mon, 9 Aug 2021 at 11:26, François Dumont via Libstdc++
> wrote:
> >
> > Some newly introduced tests in
> > 23_containers/unordered_map/cons/default.cc revealed that we are forcing
> > the allocator type to have a operator==.
>
> All alloc
On Mon, 9 Aug 2021 at 11:34, Jonathan Wakely wrote:
>
> On Mon, 9 Aug 2021 at 11:33, Jonathan Wakely wrote:
> >
> > On Mon, 9 Aug 2021 at 11:26, François Dumont via Libstdc++
> > wrote:
> > >
> > > Some newly introduced tests in
> > > 23_containers/unordered_map/cons/default.cc revealed that we ar
On Mon, 9 Aug 2021 at 13:08, François Dumont wrote:
>
> On 09/08/21 1:52 pm, François Dumont wrote:
> > On 09/08/21 12:45 pm, Jonathan Wakely wrote:
> >> On Mon, 9 Aug 2021 at 11:34, Jonathan Wakely wrote:
> >>> On Mon, 9 Aug 2021 at 11:33, Jonathan Wakely wrote:
> On Mon, 9 Aug 2021 at 11:26
On Mon, 9 Aug 2021 at 15:27, Jonathan Wakely wrote:
>
> On Mon, 9 Aug 2021 at 13:05, François Dumont via Libstdc++
> wrote:
> >
> > On 09/08/21 12:05 pm, Jonathan Wakely via Libstdc++ wrote:
> > > On Mon, 9 Aug 2021 at 10:51, Stephan Bergmann via Libstdc++
> > > wrote:
> > >> Not sure why I start
On Mon, 9 Aug 2021 at 15:42, Jonathan Wakely wrote:
>
> On Mon, 9 Aug 2021 at 15:27, Jonathan Wakely wrote:
> >
> > On Mon, 9 Aug 2021 at 13:05, François Dumont via Libstdc++
> > wrote:
> > >
> > > On 09/08/21 12:05 pm, Jonathan Wakely via Libstdc++ wrote:
> > > > On Mon, 9 Aug 2021 at 10:51, Ste
Implement these traits using the new built-ins that Jakub added
recently.
Signed-off-by: Jonathan Wakely
libstdc++-v3/ChangeLog:
* include/std/type_traits (__cpp_lib_is_pointer_interconvertible)
(is_pointer_interconvertible_base_of_v)
(is_pointer_interconvertible_base_of
This test assumes that the same sequence of three values cannot occur,
which is incorect. It's unlikely, but not impossible.
Perform the check in a loop, so that in the unlikely event of an
identical sequence, we retry. If the library code is buggy it will keep
producing the same sequence and the
Give more explicit errors if these files are not built with the correct
-std options.
libstdc++-v3/ChangeLog:
* src/c++98/locale_init.cc: Require C++11.
* src/c++98/localename.cc: Likewise.
* src/c++98/misc-inst.cc: Require C++98.
Tested powerpc64le-linux. Committed to tr
Signed-off-by: Jonathan Wakely
libstdc++-v3/ChangeLog:
* include/experimental/random (experimental::randint): Add
nodiscard attribute.
Tested powerpc64le-linux. Committed to trunk.
commit 20ce14c7991fbb498e32a0f5e3b01ae88c9f5e9a
Author: Jonathan Wakely
Date: Thu Aug 12 18:05
Signed-off-by: Jonathan Wakely
libstdc++-v3/ChangeLog:
* testsuite/26_numerics/lerp.cc: Add header name to #error.
* testsuite/26_numerics/midpoint/integral.cc: Likewise.
* testsuite/26_numerics/midpoint/version.cc: New test.
Tested powerpc64le-linux. Committed to trunk.
The [cmath.syn] p1 wording about additional overloads sufficient to
handle any arithmetic types also applies to std::lerp. This adds a new
overload of std::lerp that does the required promotions to support
arguments of arbitrary arithmetic types.
A new __promoted_t alias template is added, which t
On Mon, 16 Aug 2021 at 13:11, Jonathan Wakely wrote:
>
>
>
> On Mon, 16 Aug 2021, 12:55 Jonathan Wakely, wrote:
>>
>> I'm adding a GDB printer for std::error_code.What I have now prints
>> the category name as a quoted string, followed by the error value:
>>
>> {"system": 0}
>> {"system": 1234}
>
The additional libraries installed by --enable-libstdcxx-debug are built
without optimization to aid debugging, but the Python pretty printers
are not installed alongside them. This means that you can step through
the unoptimized library code, but at the expense of pretty printing the
library types
The expression ctx._M_indent is not a constant expression when ctx is a
reference parameter, even though _M_indent is an enumerator. Rename it
to _S_indent to be consistent with our conventions, and refer to it as
PrintContext::_S_indent to be valid C++ code (at least until P2280 is
accepted as a D
On Mon, 16 Aug 2021 at 17:51, Jonathan Wakely wrote:
>
> On Mon, 16 Aug 2021 at 13:11, Jonathan Wakely wrote:
> >
> >
> >
> > On Mon, 16 Aug 2021, 12:55 Jonathan Wakely, wrote:
> >>
> >> I'm adding a GDB printer for std::error_code.What I have now prints
> >> the category name as a quoted string
Signed-off-by: Jonathan Wakely
libstdc++-v3/ChangeLog:
* python/libstdcxx/v6/printers.py (StdErrorCodePrinter): Define.
(build_libstdcxx_dictionary): Register printer for
std::error_code and std::error_condition.
* testsuite/libstdc++-prettyprinters/cxx11.cc: Test
This is not required by the standard, but seems useful.
Signed-off-by: Jonathan Wakely
libstdc++-v3/ChangeLog:
* include/std/utility (exchange): Add noexcept-specifier.
* testsuite/20_util/exchange/noexcept.cc: New test.
Tested powerpc64le-linux. Committed to trunk.
commit 42c
This is done to match an editorial change in the working draft, to
rename the exposition-only not-same-as helper to different-from.
Signed-off-by: Jonathan Wakely
libstdc++-v3/ChangeLog:
* include/bits/ranges_util.h (__not_same_as): Rename to
__different_from.
* include/
The new contains member of the COW string is defined for non-strict
gnu++20 mode as well as for C++23 modes. I think that was left in the
committed patch unintentionally. It is inconsistent with the SSO string,
and doesn't actually compile because it uses the
basic_string_view::contains member whic
On Tue, 17 Aug 2021 at 14:27, Jonathan Wakely wrote:
>
> Signed-off-by: Jonathan Wakely
>
> libstdc++-v3/ChangeLog:
>
> * python/libstdcxx/v6/printers.py (StdErrorCodePrinter): Define.
> (build_libstdcxx_dictionary): Register printer for
> std::error_code and std::error_con
Signed-off-by: Jonathan Wakely
libstdc++-v3/ChangeLog:
* testsuite/26_numerics/random/seed_seq/cons/range.cc: Check
construction from input iterators.
Tested powerpc64le-linux. Committed to trunk.
commit 20698ec5b681e23fa3404ed0ef78e3367b28e16d
Author: Jonathan Wakely
Date:
On Tue, 17 Aug 2021 at 09:42, Antony Polukhin wrote:
>
> When std::seed_seq is constructed from random access iterators we can
> detect the internal vector size in O(1). Reserving memory for elements
> in such cases may avoid multiple memory allocations.
>
> libstdc++-v3/ChangeLog:
>
> * in
PR 101923 points out that the unconditional swap in the std::function
move constructor makes it slower than copying an empty std::function.
The copy constructor has to check for the empty case before doing
anything, and that makes it very fast for the empty case.
Adding the same check to the move
On Mon, 9 Aug 2021 at 12:47, Luc Michel wrote:
>
> This fixes an incorrect invocation of gdb on remote targets where
> DejaGNU would try to run host's gdb in remote target simulator.
> gdb-test skips the testing when target is remote or non native but the
> gdb version check function does not.
>
>
On Tue, 17 Aug 2021 at 14:40, Antony Polukhin wrote:
>
> вт, 17 авг. 2021 г. в 16:37, Jonathan Wakely :
> <...>
> > Thanks, this is a nice improvement. We can avoid tag dispatching to
> > make it simpler though:
> >
> > @@ -3248,6 +3249,9 @@ namespace __detail
> > template
> > seed_seq::seed
On Tue, 17 Aug 2021 at 20:15, Thomas Schwinge wrote:
>
> Hi!
>
> On 2020-04-16T15:21:44+0200, Matthias Kretz wrote:
> > If extra_tool_flags starts with a dash, an error like 'ERROR: verbose:
> > illegal argument: -march=native -O2 -std=c++17' is printed. This is
> > easily fixed by inserting a do
Pushed to wwwdocs as obvious.
commit 44d97225cc39f2cfbc3109c6a6473bde3886357a
Author: Jonathan Wakely
Date: Tue Aug 17 21:30:28 2021 +0100
Add missing punctuation to elements
diff --git a/htdocs/bugs/index.html b/htdocs/bugs/index.html
index 0a1b582a..99a1ddb1 100644
--- a/htdocs/bugs/i
On Tue, 17 Aug 2021 at 21:39, Krzysztof Żelechowski
wrote:
>
> PR libstdc++/PR51539
>
> ChangeLog
> * libstdc++-v3/include/bits/stl_function.h: Improve documentation.
>
> diff --git a/libstdc++-v3/include/bits/stl_function.h b/libstdc++-v3/include/
> bits/stl_function.h
> index 073018d522
On Wed, 18 Aug 2021 at 13:49, Jonathan Wakely wrote:
>
> On Tue, 17 Aug 2021 at 21:39, Krzysztof Żelechowski
> wrote:
> >template
> > struct greater : public binary_function<_Tp, _Tp, bool>
> > {
> > + /// Tests whether parameter 1 is greater (`operator>`) than
> > parameter
This fixes a compilation error in debug mode, due to std::_Bit_reference
not being defined, because it's in namespace std::__cxx1998 instead. We
can refer to it as vector::reference instead, which always works.
That fixes some compilation errors in debug mode, but the tests fail at
run-time instea
This fixes some 23_containers/*/cons/deduction.cc failures seen with
-std=c++17/-D_GLIBCXX_DEBUG, caused by non-immediate errors when
substituting template arguments into an incorrect specialization of the
std::__cxx1998 base class. This happens because the size_type member of
the debug container i
The std::complex partial specializations have been unnecessary since
774c3d8647cc7012937cfc9d2d6dacc85b6cf8e9
Signed-off-by: Jonathan Wakely
libstdc++-v3/ChangeLog:
* include/ext/type_traits.h (__promote_2, __promote_3)
(__promote_4): Redfine as alias templates using __promoted_
501 - 600 of 3694 matches
Mail list logo