Re: [[C++ PATCH]] Implement C++2a P0330R2 - Literal Suffixes for ptrdiff_t and size_t

2021-01-27 Thread Ed Smith-Rowland via Gcc-patches
On 1/27/21 3:32 PM, Jakub Jelinek wrote: On Sun, Oct 21, 2018 at 04:39:30PM -0400, Ed Smith-Rowland wrote: This patch implements C++2a proposal P0330R2 Literal Suffixes for ptrdiff_t and size_t*.  It's not official yet but looks very likely to pass.  It is incomplete because I'm looking for some

Re: [[C++ PATCH]] Implement C++2a P0330R2 - Literal Suffixes for ptrdiff_t and size_t

2021-01-30 Thread Ed Smith-Rowland via Gcc-patches
On 1/27/21 3:32 PM, Jakub Jelinek wrote: On Sun, Oct 21, 2018 at 04:39:30PM -0400, Ed Smith-Rowland wrote: This patch implements C++2a proposal P0330R2 Literal Suffixes for ptrdiff_t and size_t*.  It's not official yet but looks very likely to pass.  It is incomplete because I'm looking for some

Re: [[C++ PATCH]] Implement C++2a P0330R2 - Literal Suffixes for ptrdiff_t and size_t

2021-02-01 Thread Ed Smith-Rowland via Gcc-patches
On 2/1/21 10:33 AM, Jason Merrill wrote: On 1/30/21 6:22 PM, Ed Smith-Rowland wrote: On 1/27/21 3:32 PM, Jakub Jelinek wrote: On Sun, Oct 21, 2018 at 04:39:30PM -0400, Ed Smith-Rowland wrote: This patch implements C++2a proposal P0330R2 Literal Suffixes for ptrdiff_t and size_t*.  It's not off

Re: [[C++ PATCH]] Implement C++2a P0330R2 - Literal Suffixes for ptrdiff_t and size_t

2021-02-01 Thread Ed Smith-Rowland via Gcc-patches
On 2/1/21 2:23 PM, Jakub Jelinek wrote: On Mon, Feb 01, 2021 at 01:46:13PM -0500, Ed Smith-Rowland wrote: @@ -0,0 +1,8 @@ +// { dg-do compile { target c++23 } } + +#include +#include + +static_assert(std::is_same_v); +static_assert(std::is_same_v); Shouldn't this be std::make_signed::type ins

Re: [[C++ PATCH]] Implement C++2a P0330R2 - Literal Suffixes for ptrdiff_t and size_t

2021-02-01 Thread Ed Smith-Rowland via Gcc-patches
On 2/2/21 12:12 AM, Jason Merrill wrote: On 2/1/21 9:15 PM, Ed Smith-Rowland wrote: On 2/1/21 2:23 PM, Jakub Jelinek wrote: On Mon, Feb 01, 2021 at 01:46:13PM -0500, Ed Smith-Rowland wrote: @@ -0,0 +1,8 @@ +// { dg-do compile { target c++23 } } + +#include +#include + +static_assert(std::is_

[wwwdocs] Mention C++23 flags and addition of size_t literals.

2021-02-03 Thread Ed Smith-Rowland via Gcc-patches
I pushed this patch to update changes to mention the C++23 flags and the size_t literals. Ed commit bfc68f3f88406a07757d111a0f894426a6bc4522 Author: Ed Smith-Rowland <3dw...@verizon.net > Date: Wed Feb 3 14:23:00 2021 -0500 Mention C++23 flags and P0330R8, Lit

Re: [[C++ PATCH]] Implement C++2a P0330R2 - Literal Suffixes for ptrdiff_t and size_t

2021-02-04 Thread Ed Smith-Rowland via Gcc-patches
On 2/4/21 6:31 AM, Tam S. B. wrote: `__cpp_size_t_suffix` is defined as 202006L, but the draft standard says 202011L: http://eel.is/c++draft/cpp.predefined#tab:cpp.predefined.ft-row-48 I looks like you're right. Both the latest draft and https://isocpp.org/std/standing-documents/sd-6-sg10-fea

[RFC, libstdc++] Implement C++20 P1208R6 - source_location.

2019-11-08 Thread Ed Smith-Rowland via gcc-patches
As an experiment, I took a shot at implementing source_location for C++20.?? This was mostly done in experimental but I wanted to try adding column information.?? (The experimental version just returned 0).?? I added __builtin_COLUMN in analogy to __builtin_LINE.?? The std version is also const

Re: [RFC] Remove include/precompiled/expc++.h

2020-10-16 Thread Ed Smith-Rowland via Gcc-patches
On 10/15/20 7:21 PM, Jonathan Wakely wrote: Ed, In commit r232377 (aka 2be75957b80b640c0aac4356ab861edd0c2f1b9d in the git repo) you added a new header to the include/precompiled directory. That wasn't mentioned in the ChangeLog, wasn't in the patch posted to https://gcc.gnu.org/legacy-ml/libstd

[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

Fwd: [PATCH,libstdc++] C++ constexpr tuple is broken.

2019-11-16 Thread Ed Smith-Rowland via gcc-patches
I missed a file in my recent patch for C++20 constexpr tuple. Bestrafe Mich. Ed 2019-11-16 Edward Smith-Rowland <3dw...@verizon.net> Repair the part of C++20 p1032 Misc constexpr bits. * include/bits/uses_allocator.h (__uses_alloc0::_Sink::operaror=) (__use_alloc(const _Alloc&)) : Conste

[PATCH,libstdc++] C++-20 costexpr and

2019-05-30 Thread Ed Smith-Rowland via gcc-patches
Greetings, I was not quite able to finish this in for gcc9 but here is the patch for: ?? Implement C++20 p0202 - Add Constexpr Modifiers to Functions ??in and Headers. ??Implement C++20 p1023 - constexpr comparison operators for std::array. I believe I have answered peoples conc

Re: [PATCH,libstdc++] C++-20 costexpr and

2019-05-30 Thread Ed Smith-Rowland via gcc-patches
On 5/30/19 5:05 PM, Ed Smith-Rowland via libstdc++ wrote: Greetings, I was not quite able to finish this in for gcc9 but here is the patch for: ?? Implement C++20 p0202 - Add Constexpr Modifiers to Functions ??in and Headers. ??Implement C++20 p1023 - constexpr comparison oper

Test for C++20 p0858 - ConstexprIterator requirements.

2019-05-31 Thread Ed Smith-Rowland via gcc-patches
Greetings, Iterators for and are usabe in a constexpr context since C++2017. This just adds a compile test to make sure and check a box for C++20 p0858 - ConstexprIterator requirements. Ed 2019-06-03 Edward Smith-Rowland <3dw...@verizon.net> Test for C++20 p0858 - ConstexprIt

Re: Test for C++20 p0858 - ConstexprIterator requirements.

2019-06-01 Thread Ed Smith-Rowland via gcc-patches
On 5/31/19 6:29 PM, Ville Voutilainen wrote: On Sat, 1 Jun 2019 at 01:24, Ed Smith-Rowland via libstdc++ wrote: Greetings, Iterators for and are usabe in a constexpr context since C++2017. This just adds a compile test to make sure and check a box for C++20 p0858 - ConstexprIterator require

Re: Test for C++20 p0858 - ConstexprIterator requirements.

2019-06-01 Thread Ed Smith-Rowland via gcc-patches
On 6/1/19 2:42 PM, Ville Voutilainen wrote: On Sat, 1 Jun 2019 at 21:09, Ed Smith-Rowland <3dw...@verizon.net> wrote: On 5/31/19 6:29 PM, Ville Voutilainen wrote: On Sat, 1 Jun 2019 at 01:24, Ed Smith-Rowland via libstdc++ wrote: Greetings, Iterators for and are usabe in a constexpr contex

Re: Test for C++20 p0858 - ConstexprIterator requirements.

2019-06-08 Thread Ed Smith-Rowland via gcc-patches
On 6/7/19 11:42 AM, Jonathan Wakely wrote: On 01/06/19 15:40 -0400, Ed Smith-Rowland via libstdc++ wrote: On 6/1/19 2:42 PM, Ville Voutilainen wrote: On Sat, 1 Jun 2019 at 21:09, Ed Smith-Rowland <3dw...@verizon.net> wrote: On 5/31/19 6:29 PM, Ville Voutilainen wrote: On Sat, 1 Jun 2019 at 01

Re: Test for C++20 p0858 - ConstexprIterator requirements.

2019-06-09 Thread Ed Smith-Rowland via gcc-patches
On 6/8/19 4:28 PM, Jonathan Wakely wrote: On 08/06/19 12:05 -0400, Ed Smith-Rowland wrote: On 6/7/19 11:42 AM, Jonathan Wakely wrote: On 01/06/19 15:40 -0400, Ed Smith-Rowland via libstdc++ wrote: On 6/1/19 2:42 PM, Ville Voutilainen wrote: On Sat, 1 Jun 2019 at 21:09, Ed Smith-Rowland <3dw...

Re: Test for C++20 p0858 - ConstexprIterator requirements.

2019-06-09 Thread Ed Smith-Rowland via gcc-patches
On 6/9/19 6:28 PM, Jonathan Wakely wrote: On 10/06/19 00:03 +0200, Rainer Orth wrote: Hi Ed, I had supplied the option for gnu++2a by hand and they passed.?? They were not UNSUPPORTED. I just added the dg-options (at very top) and reran the testsuite without fancy tricks (except for gnu++2a).

Re: Test for C++20 p0858 - ConstexprIterator requirements.

2019-06-10 Thread Ed Smith-Rowland via gcc-patches
On 6/10/19 2:43 AM, Ville Voutilainen wrote: On Mon, 10 Jun 2019 at 02:53, Ed Smith-Rowland <3dw...@verizon.net> wrote: Darn it, I had those constexpr lib patches in tree. Attached are what I just committed to gcc-9 and passes there. Those std::copy didn't really add anything anyway. They adde

Re: [PATCH 1/3] C++20 constexpr lib part 1/3

2019-07-31 Thread Ed Smith-Rowland via gcc-patches
Here is the patch for * Implement C++20 p0202 - Add constexpr Modifiers to Functions in and Headers. * Implement C++20 p1023 - constexpr comparison operators for std::array. Relative to the last effort it is rebased on more recent trunk and I added to . There's some chance that I'll have

Re: [PATCH 1/3] C++20 constexpr lib part 1/3

2019-08-01 Thread Ed Smith-Rowland via gcc-patches
On 8/1/19 6:56 AM, Jonathan Wakely wrote: On 31/07/19 10:50 -0400, Ed Smith-Rowland via libstdc++ wrote: Here is the patch for * Implement C++20 p0202 - Add constexpr Modifiers to Functions in and Headers. * Implement C++20 p1023 - constexpr comparison operators for std::array. Relative t

[PATCH 2/3] C++20 constexpr lib part 2/3 - swappish functions.

2019-08-01 Thread Ed Smith-Rowland via gcc-patches
Greetings, Here is a patch for C++20 p0879 - Constexpr for swap and swap related functions. This essentially constexprifies the rest of . Built and tested with C++20 (and pre-c++20) on x86_64-linux. Ok? Regards, Ed Smith-Rowland 2019-08-01 Edward Smith-Rowland <3dw...@verizon.net>

Re: [PATCH 1/3] C++20 constexpr lib part 1/3

2019-08-01 Thread Ed Smith-Rowland via gcc-patches
On 8/1/19 3:45 PM, Jonathan Wakely wrote: On 01/08/19 11:47 -0400, Ed Smith-Rowland via libstdc++ wrote: On 8/1/19 6:56 AM, Jonathan Wakely wrote: On 31/07/19 10:50 -0400, Ed Smith-Rowland via libstdc++ wrote: Here is the patch for * Implement C++20 p0202 - Add constexpr Modifiers to Function

Re: [PATCH 1/3] C++20 constexpr lib part 1/3

2019-08-07 Thread Ed Smith-Rowland via gcc-patches
On 8/6/19 11:30 AM, Steve Ellcey wrote: Ed, I have run into an ICE that I tracked down to this patch: commit 02fefffe6b78c4c39169206aa40fb53f367ecba8 Author: emsr Date: Thu Aug 1 15:25:42 2019 + 2019-08-01 Edward Smith-Rowland <3dw...@verizon.net> Implement C++20 p0

Re: [PATCH 2/3] C++20 constexpr lib part 2/3 - swappish functions.

2019-08-14 Thread Ed Smith-Rowland via gcc-patches
On 8/13/19 7:14 AM, Jonathan Wakely wrote: On 01/08/19 13:16 -0400, Ed Smith-Rowland via libstdc++ wrote: Greetings, Here is a patch for C++20 p0879 - Constexpr for swap and swap related functions. This essentially constexprifies the rest of . Built and tested with C++20 (and pre-c++20) on

Implement C++20 p1424 - 'constexpr' feature macro concerns.

2019-08-16 Thread Ed Smith-Rowland via gcc-patches
The latest draft and I guess the above paper changed the macro names for the C++20 constexpr lib featues. __cpp_lib_constexpr_algorithms ->__cpp_lib_constexpr. This patch changes the name but not the date because I still have some work to do before I can ship the "miscellaneous" constexpr mate

Re: Implement C++20 p1424 - 'constexpr' feature macro concerns.

2019-08-21 Thread Ed Smith-Rowland via gcc-patches
On 8/20/19 6:14 PM, Jonathan Wakely wrote: On 16/08/19 22:39 -0400, Ed Smith-Rowland via libstdc++ wrote: The latest draft and I guess the above paper changed the macro names for the C++20 constexpr lib featues. __cpp_lib_constexpr_algorithms ->__cpp_lib_constexpr. The __cpp_lib_constexpr ma

[PATCH, libstdc++] Doc changes for constexpr additions for C++20 status.

2019-09-05 Thread Ed Smith-Rowland via gcc-patches
Here is a patch to the libstdc++ docs re constexpr additions. They reflect the latest macro assignments AFAICT. Constexpr interator reqs are implemented in 9.1, the rest for 10.1. Ok? Should I bother adding the Constexpr interator requirements to the gcc-9 branch docs? Ed Index: doc/html/

Re: We should mark "Should Span be Regular? P1085R2" as well.

2019-09-09 Thread Ed Smith-Rowland via gcc-patches
On 9/9/19 5:38 AM, Jonathan Wakely wrote: On 06/09/19 18:08 -0400, Ed Smith-Rowland via libstdc++ wrote: As the title says. was (correctly) delivered without comparison ops. so we chould check off p1085. Indeed, thanks! This includes the status updates for constexpr lib diffs posted previ

Re: [PATCH, libstdc++] Doc changes for constexpr additions for C++20 status.

2019-09-09 Thread Ed Smith-Rowland via gcc-patches
On 9/9/19 5:41 AM, Jonathan Wakely wrote: On 05/09/19 15:45 -0400, Ed Smith-Rowland via libstdc++ wrote: Here is a patch to the libstdc++ docs re constexpr additions. They reflect the latest macro assignments AFAICT. Constexpr interator reqs are implemented in 9.1, the rest for 10.1. Ok? Sho

[PATCH 1/3] C++20 constexpr lib part 1/3

2019-06-26 Thread Ed Smith-Rowland via gcc-patches
Here is the first of three patches for C++20 constexpr library. ?? Implement C++20 p0202 - Add constexpr Modifiers to Functions in and Headers. ??Implement C++20 p1023 - constexpr comparison operators for std::array. I believe I have answered peoples concerns with the last patch att

[PATCH] C++20 constexpr lib part 2/3

2019-06-26 Thread Ed Smith-Rowland via gcc-patches
Implement C++20 p0879 - Constexpr for swap and swap related functions. This is much smaller than the first but also basically marks swap and the algorithms that depend on swap as constexpr. It is similarly tested on x86_64-linux: $ make check -k -j4 $ make check RUNTESTFLAGS=--target_board=u

Re: [PATCH 1/3] C++20 constexpr lib part 1/3

2019-06-27 Thread Ed Smith-Rowland via gcc-patches
On 6/27/19 11:41 AM, Jonathan Wakely wrote: On 26/06/19 19:13 -0400, Ed Smith-Rowland via libstdc++ wrote: Here is the first of three patches for C++20 constexpr library. ?? Implement C++20 p0202 - Add constexpr Modifiers to Functions in and Headers. ??Implement C++20 p1023 - conste

Re: [PATCH 1/3] C++20 constexpr lib part 1/3

2019-06-27 Thread Ed Smith-Rowland via gcc-patches
On 6/27/19 1:06 PM, Ville Voutilainen wrote: On Thu, 27 Jun 2019 at 19:55, Ed Smith-Rowland via libstdc++ wrote: I don't think this will work in a constant expression: ?? /// Assign @p __new_val to @p __obj and return its previous value. ?? template +?? _GLIBCXX20_CONSTEXPR ?? inline

Fail building modula2.

2019-06-28 Thread Ed Smith-Rowland via gcc-patches
Gaius, I tried to apply your patch and build and got the following error: -- /home/ed/obj_modula2/./prev-gcc/xg++ -B/home/ed/obj_modula2/./prev-gcc/ -B/home/ed/bin_modula2/x86_64-pc-linux-gnu/bin/ -nostdinc++ -B/home/ed/ob

Re: Fail building modula2.

2019-06-30 Thread Ed Smith-Rowland via gcc-patches
Gaius, I missed the fact that there are two patch sets.?? Things built like a charm.?? Testing now. Thank you. Ed

Re: [PATCH 1/3] C++20 constexpr lib part 1/3

2019-07-05 Thread Ed Smith-Rowland via gcc-patches
On 7/2/19 8:11 AM, Jonathan Wakely wrote: One more comment. In this: +#if __cplusplus > 201703L \ +?? && defined(_GLIBCXX_HAVE_BUILTIN_IS_CONSTANT_EVALUATED) +?? if (__builtin_is_constant_evaluated()) can be simplified to just: #ifdef __cpp_lib_is_constant_evaluated if (s

Re: [PATCH 1/3] C++20 constexpr lib part 1/3

2019-07-11 Thread Ed Smith-Rowland via gcc-patches
On 7/6/19 3:55 AM, Ville Voutilainen wrote: Blargh! But that's fine; the result of copy is not stored in a constexpr variable, but the function return is static_asserted so we have sufficiently tested that std::copy is indeed constexpr-compatible since it appears in a function that is evaluated

Implement C++20 constexpr , , and

2019-03-17 Thread Ed Smith-Rowland via gcc-patches
Greetings, This patch implements C++20 p0202 - Add Constexpr Modifiers to Functions in and Headers and C++20 p1023 - constexpr comparison operators for std::array. The patch is large because of the testsuite additions. Basically, the algorithms and the array comparison operators are all m

Re: Implement C++20 constexpr , , and

2019-03-18 Thread Ed Smith-Rowland via gcc-patches
On 3/18/19 6:18 PM, Jonathan Wakely wrote: On 17/03/19 22:54 -0400, Ed Smith-Rowland via libstdc++ wrote: Greetings, This patch implements C++20 p0202 - Add Constexpr Modifiers to Functions in and Headers and C++20 p1023 - constexpr comparison operators for std::array. The patch is large

Re: Implement C++20 constexpr , , and

2019-03-19 Thread Ed Smith-Rowland via gcc-patches
On 3/18/19 6:18 PM, Jonathan Wakely wrote: On 17/03/19 22:54 -0400, Ed Smith-Rowland via libstdc++ wrote: Greetings, This patch implements C++20 p0202 - Add Constexpr Modifiers to Functions in and Headers and C++20 p1023 - constexpr comparison operators for std::array. The patch is large

Re: Implement C++20 constexpr , , and

2019-03-19 Thread Ed Smith-Rowland via gcc-patches
On 3/19/19 4:57 PM, Ed Smith-Rowland via libstdc++ wrote: On 3/18/19 6:18 PM, Jonathan Wakely wrote: On 17/03/19 22:54 -0400, Ed Smith-Rowland via libstdc++ wrote: Greetings, This patch implements C++20 p0202 - Add Constexpr Modifiers to Functions in and Headers and C++20 p1023 - constexp

Re: Implement C++20 constexpr , , and

2019-03-29 Thread Ed Smith-Rowland via gcc-patches
Greetings, This patch implements C++20 constexpr for , , . It's a large patch but only affects C++20 and the volume is mostly test cases. This differs from the previous patch in actually testing constexpr :-\ and in the addition of wrappers for __builtin_memmove and __builtin_memcmp that su

Re: Implement C++20 constexpr , , and

2019-03-29 Thread Ed Smith-Rowland via gcc-patches
On 3/29/19 9:23 AM, Jakub Jelinek wrote: On Fri, Mar 29, 2019 at 09:10:26AM -0400, Ed Smith-Rowland via gcc-patches wrote: Greetings, This patch implements C++20 constexpr for , , . It's a large patch but only affects C++20 and the volume is mostly test cases. This differs from the pre

Re: Implement C++20 constexpr , , and

2019-03-29 Thread Ed Smith-Rowland via gcc-patches
On 3/29/19 11:12 AM, Jakub Jelinek wrote: On Fri, Mar 29, 2019 at 11:07:53AM -0400, Jason Merrill wrote: On Tue, Mar 19, 2019 at 4:57 PM Ed Smith-Rowland via gcc-patches wrote: On 3/18/19 6:18 PM, Jonathan Wakely wrote: On 17/03/19 22:54 -0400, Ed Smith-Rowland via libstdc++ wrote: I'm

Re: Implement C++20 constexpr , , and

2019-03-29 Thread Ed Smith-Rowland via gcc-patches
On 3/29/19 12:39 PM, Jakub Jelinek wrote: On Fri, Mar 29, 2019 at 12:02:48PM -0400, Ed Smith-Rowland wrote: This differs from the previous patch in actually testing constexpr :-\ and in the addition of wrappers for __builtin_memmove and __builtin_memcmp that supply constexpr branches if C++20 an

Implement numeric_limits<__float128>.

2019-05-10 Thread Ed Smith-Rowland via gcc-patches
Greetings, I know people are mostly looking at release branch work but I'd like to post this.  Other projects like mppp and boost use our __float128 with C++.  I use it for specfun testing and various other projects. I'd like to offer a series of patches to enable this support straight from l