Re: [PATCH] libstdc++: more #pragma diagnostic

2024-09-24 Thread Jonathan Wakely
On Tue, 24 Sept 2024, 21:43 Jason Merrill, wrote: > On 9/24/24 7:51 AM, Jason Merrill wrote: > > Tested x86_64-pc-linux-gnu. > > > > Is this the right fix, or do we want to stop using these deprecated > classes, > > here and in stl_function.h? > We can't stop using them in stl_function.h for ABI

Re: [PATCH] libstdc++: more #pragma diagnostic

2024-09-24 Thread Jason Merrill
On 9/24/24 7:51 AM, Jason Merrill wrote: Tested x86_64-pc-linux-gnu. Is this the right fix, or do we want to stop using these deprecated classes, here and in stl_function.h? Oops, adding libstdc++ CC. -- 8< -- The CI saw failures on 17_intro/headers/c++2011/parallel_mode.cc due to -Wdepreca

[PATCH] libstdc++: more #pragma diagnostic

2024-09-24 Thread Jason Merrill
Tested x86_64-pc-linux-gnu. Is this the right fix, or do we want to stop using these deprecated classes, here and in stl_function.h? -- 8< -- The CI saw failures on 17_intro/headers/c++2011/parallel_mode.cc due to -Wdeprecated-declarations warnings in some parallel/ headers. libstdc++-v3/Change

Re: [PATCH] libstdc++: More efficient std::chrono::year::leap.

2021-06-24 Thread Cassio Neri via Gcc-patches
Thanks Jonathan. Here are some benchmarks (assembly in [1]): https://quick-bench.com/q/jclBXmi4QLDcRMLuuVpxTUsFmQw Unfortunately, quick-bench times out unless some implementations are commented out. You can copy the code and run it locally (needs google benchmark) to get the full picture. I real

Re: [PATCH] libstdc++: More efficient std::chrono::year::leap.

2021-06-23 Thread Jonathan Wakely via Gcc-patches
On 23/06/21 18:51 +0100, Jonathan Wakely wrote: Here's what I've committed. Tested x86_64-linux and powerpc64le-linux. Pushed to trunk. commit b92d12d3fe3f1aa56d190d960e40c62869a6cfbb Author: Cassio Neri Date: Wed Jun 23 15:32:16 2021 libstdc++: More efficient std::chrono::year::leap

Re: [PATCH] libstdc++: More efficient std::chrono::year::leap.

2021-06-23 Thread Jonathan Wakely via Gcc-patches
On 23/06/21 14:16 +0100, Jonathan Wakely wrote: On 23/06/21 12:45 +0100, Jonathan Wakely wrote: On 21/05/21 19:44 +0100, Cassio Neri via Libstdc++ wrote: I've checked the generated code and the compiler doesn't figure out the logic. I added a comment to explain. (Revised patch below and attach

Re: [PATCH] libstdc++: More efficient std::chrono::year::leap.

2021-06-23 Thread Jonathan Wakely via Gcc-patches
On 23/06/21 12:45 +0100, Jonathan Wakely wrote: On 21/05/21 19:44 +0100, Cassio Neri via Libstdc++ wrote: I've checked the generated code and the compiler doesn't figure out the logic. I added a comment to explain. (Revised patch below and attached.) Best wishes, Cassio. --- Simple change to

Re: [PATCH] libstdc++: More efficient std::chrono::year::leap.

2021-06-23 Thread Jonathan Wakely via Gcc-patches
On 21/05/21 19:44 +0100, Cassio Neri via Libstdc++ wrote: I've checked the generated code and the compiler doesn't figure out the logic. I added a comment to explain. (Revised patch below and attached.) Best wishes, Cassio. --- Simple change to std::chrono::year::is_leap. If a year is multipl

Re: [PATCH] libstdc++: More efficient std::chrono::year::leap.

2021-05-21 Thread Cassio Neri via Gcc-patches
I've checked the generated code and the compiler doesn't figure out the logic. I added a comment to explain. (Revised patch below and attached.) Best wishes, Cassio. --- Simple change to std::chrono::year::is_leap. If a year is multiple of 100, then it's divisible by 400 if and only if it's div

Re: [PATCH] libstdc++: More efficient std::chrono::year::leap.

2021-05-21 Thread Koning, Paul via Gcc-patches
> On May 21, 2021, at 1:46 PM, Cassio Neri via Gcc-patches > wrote: > > Simple change to std::chrono::year::is_leap. If a year is multiple of 100, > then it's divisible by 400 if and only if it's divisible by 16. The latter > allows for better code generation. I wonder if the optimizer could

[PATCH] libstdc++: More efficient std::chrono::year::leap.

2021-05-21 Thread Cassio Neri via Gcc-patches
Simple change to std::chrono::year::is_leap. If a year is multiple of 100, then it's divisible by 400 if and only if it's divisible by 16. The latter allows for better code generation. Tested on x86_64-pc-linux-gnu. libstdc++-v3/ChangeLog: * include/std/chrono: diff --git a/libstdc++-v3/include

Re: [PATCH, libstdc++] More

2019-11-25 Thread François Dumont
I have a patch for the same location so here is my remark that might make my patch useless. Maybe you can even merge it with yours Ed, here it is: https://gcc.gnu.org/ml/libstdc++/2019-10/msg00072.html On 11/25/19 10:15 PM, Jonathan Wakely wrote: On 15/11/19 22:17 -0500, Ed Smith-Rowland via

Re: [PATCH, libstdc++] More

2019-11-25 Thread Jonathan Wakely
On 15/11/19 22:17 -0500, Ed Smith-Rowland via libstdc++ wrote: Index: include/bits/stl_algobase.h === --- include/bits/stl_algobase.h (revision 278318) +++ include/bits/stl_algobase.h (working copy) @@ -107,6 +107,50 @@ } /* +

[PATCH, libstdc++] More

2019-11-15 Thread Ed Smith-Rowland via gcc-patches
First of all, the redo of the iterator portion in response to https://gcc.gnu.org/ml/gcc-patches/2019-11/msg01467.html passed testing. This patch contains constexpr char_traits. I also found an old extension that had been left out of the constexpr bandwagon that I caught up. This patch also