[PATCH v2 0/3] c++: Track lifetimes in constant evaluation [PR70331,...]

2023-06-13 Thread Nathaniel Shead via Gcc-patches
(Another) ping. I also have some more changes on top of this patch set as well if this looks good as it is. https://gcc.gnu.org/pipermail/gcc-patches/2023-March/614811.html Thanks! On Wed, Mar 29, 2023 at 01:32:55PM +1100, Nathaniel Shead wrote: > This is an update of the patch ser

ping: [PATCH] c++: Report invalid id-expression in decltype [PR100482]

2023-05-27 Thread Nathaniel Shead via Gcc-patches
Ping: https://gcc.gnu.org/pipermail/gcc-patches/2023-April/617145.html Also it looks like I forgot to mention, but this patch was bootstrapped and regtested on x86_64-pc-linux-gnu. On Sun, Apr 30, 2023 at 12:00:05PM +1000, Nathaniel Shead wrote: > This patch ensures that any errors rai

ping: [PATCH] c++: Fix ICE with parameter pack of decltype(auto) [PR103497]

2023-05-27 Thread Nathaniel Shead via Gcc-patches
Ping: https://gcc.gnu.org/pipermail/gcc-patches/2023-April/616465.html On Sat, Apr 22, 2023 at 04:25:13PM +1000, Nathaniel Shead wrote: > Bootstrapped and tested on x86_64-pc-linux-gnu. > > -- 8< -- > > This patch raises an error early when the decltype(auto) specifier is >

Re: [Ping][PATCH] libstdc++: Add missing functions to [PR79700]

2023-05-17 Thread Nathaniel Shead via Gcc-patches
On Wed, May 17, 2023 at 10:05:59AM +0100, Jonathan Wakely wrote: > On Wed, 17 May 2023 at 09:37, Nathaniel Shead wrote: > > > Now that GCC13.1 is released is it ok to merge? Thanks! > > > > Yes, I've been testing this locally, but I think it needs more work (sorry!) >

Re: [Ping][PATCH] libstdc++: Add missing functions to [PR79700]

2023-05-17 Thread Nathaniel Shead via Gcc-patches
Now that GCC13.1 is released is it ok to merge? Thanks! On Tue, Apr 18, 2023 at 6:48 PM Jonathan Wakely wrote: > > On Mon, 17 Apr 2023 at 09:11, Nathaniel Shead > wrote: > > > > Hi, just checking whether there were any issues with this patch? > > https://gcc.gnu.org

Re: [PATCH v2 0/3] c++: Track lifetimes in constant evaluation [PR70331, ...]

2023-05-08 Thread Nathaniel Shead via Gcc-patches
Just pinging in case this fix has fallen through the cracks. https://gcc.gnu.org/pipermail/gcc-patches/2023-March/614811.html On Wed, Mar 29, 2023 at 1:33 PM Nathaniel Shead wrote: > > This is an update of the patch series at > https://gcc.gnu.org/pipermail/gcc-patches/2023-March/61

[PATCH] c++: Report invalid id-expression in decltype [PR100482]

2023-04-29 Thread Nathaniel Shead via Gcc-patches
for in finish_id_expression. PR 100482 gcc/cp/ChangeLog: * parser.cc (cp_parser_decltype_expr): Report errors raised by finish_id_expression. gcc/testsuite/ChangeLog: * g++.dg/pr100482.C: New test. Signed-off-by: Nathaniel Shead --- gcc/cp/parser.cc

[PATCH] c++: Fix ICE with parameter pack of decltype(auto) [PR103497]

2023-04-22 Thread Nathaniel Shead via Gcc-patches
Log: * parser.cc (cp_parser_simple_type_specifier): Add check for decltype(auto) as function parameter. gcc/testsuite/ChangeLog: * g++.dg/pr103497.C: New test. Signed-off-by: Nathaniel Shead --- gcc/cp/parser.cc| 10 ++ gcc/testsuite/g++.dg/pr103497.C |

[Ping][PATCH] libstdc++: Add missing functions to [PR79700]

2023-04-17 Thread Nathaniel Shead via Gcc-patches
Hi, just checking whether there were any issues with this patch? https://gcc.gnu.org/pipermail/gcc-patches/2023-February/612386.html Otherwise I assume it won't be in GCC13. Thanks, Nathaniel

[PATCH v2 3/3] c++: Improve location information in constexpr evaluation

2023-03-28 Thread Nathaniel Shead via Gcc-patches
rithms/equal/constexpr_neg.cc: Updated diagnostics locations. Signed-off-by: Nathaniel Shead --- gcc/cp/constexpr.cc | 83 +++ gcc/testsuite/g++.dg/cpp0x/constexpr-48089.C | 10 +-- gcc/testsuite/g++.dg/cpp0x/constexpr-diag3.C | 2 +- gcc/tests

[PATCH v2 1/3] c++: Track lifetimes in constant evaluation [PR70331, PR96630, PR98675]

2023-03-28 Thread Nathaniel Shead via Gcc-patches
. * g++.dg/cpp1y/constexpr-lifetime5.C: New test. Signed-off-by: Nathaniel Shead --- gcc/cp/constexpr.cc | 69 +++ gcc/cp/cp-tree.h | 10 ++- gcc/cp/module.cc | 2 + gcc/testsuite/g++.dg/cpp0x

[PATCH v2 0/3] c++: Track lifetimes in constant evaluation [PR70331, ...]

2023-03-28 Thread Nathaniel Shead via Gcc-patches
to improve diagnostic locations are otherwise unchanged. Bootstrapped and regression tested on x86_64 linux. Nathaniel --- Nathaniel Shead (3): c++: Track lifetimes in constant evaluation [PR70331,PR96630,PR98675] c++: Improve constexpr error for dangling local variables c++: Improve location i

[PATCH v2 2/3] c++: Improve constexpr error for dangling local variables

2023-03-28 Thread Nathaniel Shead via Gcc-patches
t reported message is correct. * g++.dg/warn/Wreturn-local-addr-6.C: Remove check for return value optimisation. Signed-off-by: Nathaniel Shead --- gcc/cp/semantics.cc | 5 - gcc/cp/typeck.cc | 5 +++-- gcc/t

Re: [PATCH 1/3] c++: Track lifetimes in constant evaluation [PR70331, PR96630, PR98675]

2023-03-28 Thread Nathaniel Shead via Gcc-patches
On Tue, Mar 28, 2023 at 10:50 PM Jakub Jelinek wrote: > > On Tue, Mar 28, 2023 at 10:32:28PM +1100, Nathaniel Shead via Gcc-patches > wrote: > > * tree-core.h (struct tree_decl_common): New flag to check if > > value lifetime has expired. > > * tr

[PATCH 2/3] c++: Improve constexpr error for dangling local variables

2023-03-28 Thread Nathaniel Shead via Gcc-patches
t reported message is correct. * g++.dg/warn/Wreturn-local-addr-6.C: Remove check for return value optimisation. Signed-off-by: Nathaniel Shead --- gcc/cp/semantics.cc | 5 - gcc/cp/typeck.cc | 5 +++-- gcc/t

[PATCH 1/3] c++: Track lifetimes in constant evaluation [PR70331, PR96630, PR98675]

2023-03-28 Thread Nathaniel Shead via Gcc-patches
.C: New test. * g++.dg/cpp1y/constexpr-lifetime5.C: New test. Signed-off-by: Nathaniel Shead --- gcc/cp/constexpr.cc | 66 +++ gcc/cp/module.cc | 2 + gcc/print-tree.cc | 4 ++ gcc

[PATCH 3/3] c++: Improve location information in constexpr evaluation

2023-03-28 Thread Nathaniel Shead via Gcc-patches
rithms/equal/constexpr_neg.cc: Updated diagnostics locations. Signed-off-by: Nathaniel Shead --- gcc/cp/constexpr.cc | 83 +++ gcc/testsuite/g++.dg/cpp0x/constexpr-48089.C | 10 +-- gcc/testsuite/g++.dg/cpp0x/constexpr-diag3.C | 2 +- gcc/tests

[PATCH 0/3] Track lifetimes in constant evaluation [PR70331,...]

2023-03-28 Thread Nathaniel Shead via Gcc-patches
option here would be to add a new lookup table to constexpr_global_ctx which tracks what decls are in lifetime, but I expect that to negatively impact performance. I haven't done any benchmarks on this however. Bootstrapped and regression tested on x86_64 linux. --- Nathaniel Shead (3): c

Re: [committed] libstdc++: Add const to hash>::operator() [PR109165]

2023-03-17 Thread Nathaniel Shead via Gcc-patches
On Sat, Mar 18, 2023 at 7:36 AM Jonathan Wakely via Libstdc++ wrote: > > Tested x86_64-linux. Pushed to trunk. gcc-12 backport needed too. > > -- >8 -- > > libstdc++-v3/ChangeLog: > > PR libstdc++/109165 > * include/std/coroutine (hash<>::operator()): Add const. > *

Re: [PATCH] libstdc++: Add missing functions to [PR79700]

2023-02-21 Thread Nathaniel Shead via Gcc-patches
On Mon, Feb 20, 2023 at 12:08:38PM +, Jonathan Wakely wrote: > On Mon, 20 Feb 2023 at 11:57, Nathaniel Shead > wrote: > > > > On Mon, Feb 20, 2023 at 10:30 PM Jonathan Wakely wrote: > > > > > > On Mon, 20 Feb 2023 at 11:23, Nathan

Re: [PATCH] libstdc++: Add missing functions to [PR79700]

2023-02-20 Thread Nathaniel Shead via Gcc-patches
On Mon, Feb 20, 2023 at 10:30 PM Jonathan Wakely wrote: > > On Mon, 20 Feb 2023 at 11:23, Nathaniel Shead via Libstdc++ > wrote: > > > > The comments on PR79700 mentioned that it was somewhat ambiguous whether > > these functions were supposed to exist for C++11 or n

[PATCH] libstdc++: Add missing functions to [PR79700]

2023-02-20 Thread Nathaniel Shead via Gcc-patches
rtf, sqrtl, tanf, tanl, tanhf, tanhl): Add aliases in namespace std. * testsuite/26_numerics/headers/cmath/functions_std_c++17.cc: Add checks for existence of above names. Signed-off-by: Nathaniel Shead --- libstdc++-v3/include/c_global/cmath |

[PATCH 2/2] libstdc++: Implement P1413R3 'deprecate aligned_storage and aligned_union'

2022-12-28 Thread Nathaniel Shead via Gcc-patches
e_t, aligned_union_t): Deprecate for C++23. * testsuite/20_util/aligned_storage/deprecated-2b.cc: New test. * testsuite/20_util/aligned_union/deprecated-2b.cc: New test. Signed-off-by: Nathaniel Shead --- libstdc++-v3/doc/doxygen/user.cfg.in | 2 ++ libstdc++-v3/include/bits/c++con

[PATCH 1/2] libstdc++: Normalise _GLIBCXX20_DEPRECATED macro

2022-12-28 Thread Nathaniel Shead via Gcc-patches
off-by: Nathaniel Shead --- libstdc++-v3/doc/doxygen/user.cfg.in | 4 ++-- libstdc++-v3/include/bits/c++config | 6 +++--- libstdc++-v3/include/std/type_traits | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/libstdc++-v3/doc/doxygen/user.cfg.in b/libstdc++-v3/doc/doxygen/user.cfg

Re: [PATCH] libstdc++: Set active union member in constexpr std::string [PR103295]

2022-11-11 Thread Nathaniel Shead via Gcc-patches
; On Fri, 11 Nov 2022 at 11:23, Nathaniel Shead via Libstdc++ > > > wrote: > > > > > > > > Hi, > > > > > > > > Below is a patch to fix std::string in constexpr contexts on Clang. This > > > > was originally fixed in th

[PATCH] libstdc++: Set active union member in constexpr std::string [PR103295]

2022-11-11 Thread Nathaniel Shead via Gcc-patches
off-by: Nathaniel Shead --- libstdc++-v3/include/bits/basic_string.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libstdc++-v3/include/bits/basic_string.h b/libstdc++-v3/include/bits/basic_string.h index 9c2b57f5a1d..2790fd49b05 100644 --- a/libstdc++-v3/include/b

<    1   2   3