Re: [PATCH] c++/modules: fix virtual destructors [PR103499]

2023-11-09 Thread Nathaniel Shead
On Thu, Nov 09, 2023 at 05:57:39PM -0500, Nathan Sidwell wrote: > On 11/9/23 04:55, Nathaniel Shead wrote: > > I'm not sure if this is just papering over a general issue of clones not > > being > > exported/imported, or if this is just an exception to the general case o

[PATCH] c++/modules: more checks for exporting names with using-declarations

2023-11-10 Thread Nathaniel Shead
ngeLog: * name-lookup.cc (check_can_export_using_decl): New. (do_nonmember_using_decl): Use above to check if names can be exported. gcc/testsuite/ChangeLog: * g++.dg/modules/using-10.C: New test. * g++.dg/modules/using-enum-2.C: New test. Signed-off-by: Nathaniel

[PATCH] c++/modules: seed namespaces for bindings [PR106363]

2023-11-11 Thread Nathaniel Shead
le_state::write_cluster): Don't skip first depset for bindings. gcc/testsuite/ChangeLog: * g++.dg/modules/pr106363_a.C: New test. * g++.dg/modules/pr106363_b.C: New test. Signed-off-by: Nathaniel Shead --- gcc/cp/module.cc | 4 +---

[PATCH] c++/modules: check mismatching exports for class tags [PR98885]

2023-11-12 Thread Nathaniel Shead
heck exporting decl that is already declared as non-exporting. gcc/testsuite/ChangeLog: * g++.dg/modules/export-1.C: Adjust error messages. Remove xfails for working case. Add new test case. Signed-off-by: Nathaniel Shead --- gcc/cp/decl.cc | 21

[PATCH 2/1] c++/modules: Allow exporting a typedef redeclaration

2023-11-12 Thread Nathaniel Shead
decl.cc (duplicate_decls): Allow exporting a redeclaration of a typedef. gcc/testsuite/ChangeLog: * g++.dg/modules/export-1.C: Adjust test. Signed-off-by: Nathaniel Shead --- gcc/cp/decl.cc | 5 - gcc/testsuite/g++.dg/modules/export-1.C | 6 +- 2 files

[PATCH] c++/modules: Support lambdas in static template member initialisers [PR107398]

2023-11-13 Thread Nathaniel Shead
* g++.dg/modules/lambda-6_a.C: New test. * g++.dg/modules/lambda-6_b.C: New test. Signed-off-by: Nathaniel Shead --- gcc/cp/module.cc | 35 +-- gcc/testsuite/g++.dg/modules/lambda-6_a.C | 16 +++ gcc/testsuite/g++.dg/modules/lambda-6_

[PATCH] c++/modules: Restrict partitions when parsing import declarations [PR110808]

2023-11-13 Thread Nathaniel Shead
uite/ChangeLog: * g++.dg/modules/part-hdr-1_c.C: Fix syntax. * g++.dg/modules/part-mac-1_c.C: Likewise. * g++.dg/modules/part-8_a.C: New test. * g++.dg/modules/part-8_b.C: New test. * g++.dg/modules/part-8_c.C: New test. Signed-off-by: Nathaniel

[PATCH] c++/modules: Allow exporting const-qualified namespace-scope variables [PR99232]

2023-11-15 Thread Nathaniel Shead
if it is exported, see p4.8). PR c++/99232 gcc/cp/ChangeLog: * decl.cc (grokvardecl): Don't mark variables attached to modules as internal. gcc/testsuite/ChangeLog: * g++.dg/modules/pr99232_a.C: New test. * g++.dg/modules/pr99232_b.C: New test. Signed-off-

[PATCH] c++: Set DECL_CONTEXT for __cxa_thread_atexit [PR99187]

2023-11-16 Thread Nathaniel Shead
support functions. PR c++/99187 gcc/cp/ChangeLog: * cp-tree.h (enum cp_tree_index): (thread_atexit_node): * decl.cc (get_thread_atexit_node): gcc/testsuite/ChangeLog: * g++.dg/modules/pr99187.C: New test. Signed-off-by: Nathaniel Shead --- gcc/cp/c

[PATCH] c++: Check module attachment instead of purview when necessary [PR112631]

2023-11-20 Thread Nathaniel Shead
Bootstrapped and regtested on x86_64-pc-linux-gnu. I don't have write access. -- >8 -- Block-scope declarations of functions or extern values are not allowed when attached to a named module. Similarly, class member functions are not inline if attached to a named module. However, in both these cas

[PATCH] c++/modules: Prevent overwriting arguments for duplicates [PR112588]

2023-11-22 Thread Nathaniel Shead
/cp/ChangeLog: * module.cc (trees_in::read_function_def): Don't overwrite arguments. gcc/testsuite/ChangeLog: * g++.dg/modules/merge-16.h: New test. * g++.dg/modules/merge-16_a.C: New test. * g++.dg/modules/merge-16_b.C: New test. Signed-off-by: Nathaniel

[PATCH] c++: Clear uninstantiated friend flag when instantiating [PR104234]

2023-11-23 Thread Nathaniel Shead
gcc/cp/ChangeLog: * pt.cc (tsubst_template_decl): gcc/testsuite/ChangeLog: * g++.dg/modules/pr104234.C: New test. Signed-off-by: Nathaniel Shead --- gcc/cp/pt.cc| 2 ++ gcc/testsuite/g++.dg/modules/pr104234.C | 16 2 files cha

Re: [PATCH] c++: Clear uninstantiated friend flag when instantiating [PR104234]

2023-11-23 Thread Nathaniel Shead
Sorry, I just noticed I hadn't actually filled in the changelog. It should say "Clear DECL_UNINSTANTIATED_TEMPLATE_FRIEND_P." On Thu, Nov 23, 2023 at 11:54 PM Nathaniel Shead wrote: > > Bootstrapped and regtested on x86_64-pc-linux-gnu. I don't have write > acces

[COMMITTED] MAINTAINERS: Add myself to write after approval and DCO

2023-11-23 Thread Nathaniel Shead
ChangeLog: * MAINTAINERS: Add myself to write after approval and DCO Signed-off-by: Nathaniel Shead --- MAINTAINERS | 2 ++ 1 file changed, 2 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index b70336761ab..0dbcbadcfd7 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -653,6 +653,7

[PATCH] c++: Allow exporting a typedef redeclaration [PR102341]

2023-11-23 Thread Nathaniel Shead
On Thu, Nov 23, 2023 at 11:45:31AM -0500, Nathan Sidwell wrote: > On 11/13/23 01:09, Nathaniel Shead wrote: > > I happened to be browsing the standard a bit later and noticed that we > > incorrectly reject the example given below. > > > > Bootstrapped on x86_64-pc-li

Re: [PATCH] c++/modules: Support lambdas in static template member initialisers [PR107398]

2023-11-23 Thread Nathaniel Shead
On Thu, Nov 23, 2023 at 11:49:39AM -0500, Nathan Sidwell wrote: > On 11/13/23 06:58, Nathaniel Shead wrote: > > Bootstrapped and regtested on x86_64-pc-linux-gnu. I don't have write > > access. > > > > -- >8 -- > > > > The testcase noted in th

[PATCH v2] c++: Follow module grammar more closely [PR110808]

2023-11-24 Thread Nathaniel Shead
On Thu, Nov 23, 2023 at 12:11:58PM -0500, Nathan Sidwell wrote: > On 11/14/23 01:24, Nathaniel Shead wrote: > > I'll also note that the comments above the parsing functions here no > > longer exactly match with the grammar in the standard, should they be > > updated as w

Re: [PATCH] c++: Check module attachment instead of purview when necessary [PR112631]

2023-11-26 Thread Nathaniel Shead
On Thu, Nov 23, 2023 at 03:03:37PM -0500, Nathan Sidwell wrote: > On 11/20/23 04:47, Nathaniel Shead wrote: > > Bootstrapped and regtested on x86_64-pc-linux-gnu. I don't have write > > access. > > > > -- >8 -- > > > > Block-scope declaration

Re: [PATCH] c++: fix noexcept checking for trivial operations [PR96090]

2023-11-27 Thread Nathaniel Shead
tin), but as it hasn't yet been accepted I think at least ensuring the builtin matches the behaviour of the operator is probably still sensible. On Sun, Oct 29, 2023 at 12:43:28PM +1100, Nathaniel Shead wrote: > Bootstrapped and regtested on x86_64-pc-linux-gnu. > > -- >8 -- >

Re: [PATCH] c++: End lifetime of objects in constexpr after destructor call [PR71093]

2023-11-27 Thread Nathaniel Shead
Ping for https://gcc.gnu.org/pipermail/gcc-patches/2023-November/635071.html. On Fri, Nov 03, 2023 at 12:34:06PM +1100, Nathaniel Shead wrote: > Oh, this also fixes PR102284 and its other linked PRs (apart from > fields); I forgot to note that in the commit. > > On Fri, Nov 03, 2

[PATCH] c++: Fix mangling of otherwise unattached class-scope lambdas [PR116568]

2024-09-05 Thread Nathaniel Shead
. * g++.dg/modules/lambda-8_a.H: New test. * g++.dg/modules/lambda-8_b.C: New test. Signed-off-by: Nathaniel Shead --- gcc/cp/cp-tree.h | 3 +- gcc/cp/parser.cc | 31 + gcc/cp/pt.cc

[PATCH v2] c++: Catch indirect change of active union member in constexpr [PR101631]

2023-09-17 Thread Nathaniel Shead via Gcc-patches
2a/constexpr-union3.C: New test. * g++.dg/cpp2a/constexpr-union4.C: New test. * g++.dg/cpp2a/constexpr-union5.C: New test. Signed-off-by: Nathaniel Shead --- gcc/cp/call.cc| 11 +- gcc/cp/class.cc | 8 ++

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

2023-07-21 Thread Nathaniel Shead via Gcc-patches
On Fri, Jul 21, 2023 at 05:44:51PM -0400, Jason Merrill wrote: > On 7/21/23 01:39, Nathaniel Shead wrote: > > On Thu, Jul 20, 2023 at 11:46:47AM -0400, Jason Merrill wrote: > > > On 7/20/23 05:36, Nathaniel Shead wrote: > > > > Currently, when typeck discovers that a

Re: [PATCH v4 3/3] c++: Improve location information in constant evaluation

2023-07-21 Thread Nathaniel Shead via Gcc-patches
On Fri, Jul 21, 2023 at 3:00 AM Jason Merrill wrote: > > On 7/20/23 05:37, Nathaniel Shead wrote: > > This patch updates 'input_location' during constant evaluation to ensure > > that errors in subexpressions that lack location information still > > provide accur

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

2023-07-21 Thread Nathaniel Shead via Gcc-patches
On Thu, Jul 20, 2023 at 10:42:29AM -0400, Jason Merrill wrote: > On 7/20/23 05:35, Nathaniel Shead wrote: > > This adds rudimentary lifetime tracking in C++ constexpr contexts, > > allowing the compiler to report errors with using values after their > > backing has gone out o

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

2023-07-22 Thread Nathaniel Shead via Gcc-patches
for this specific case. Thanks very much for all the reviews and comments so far! Bootstrapped and regtested on x86_64-pc-linux-gnu. Nathaniel Shead (3): c++: Improve location information in constant evaluation c++: Prevent dangling pointers from becoming nullptr in constexpr [PR1

[PATCH v5 1/3] c++: Improve location information in constant evaluation

2023-07-22 Thread Nathaniel Shead via Gcc-patches
g++.dg/cpp2a/constexpr-new3.C: Likewise. * g++.dg/cpp2a/constinit10.C: Likewise. * g++.dg/cpp2a/is-corresponding-member4.C: Likewise. * g++.dg/ext/constexpr-vla2.C: Likewise. * g++.dg/ext/constexpr-vla3.C: Likewise. * g++.dg/ubsan/pr63956.C: Likewise.

[PATCH v5 2/3] c++: Prevent dangling pointers from becoming nullptr in constexpr [PR110619]

2023-07-22 Thread Nathaniel Shead via Gcc-patches
to caller. gcc/testsuite/ChangeLog: * g++.dg/cpp1y/constexpr-110619.C: New test. Signed-off-by: Nathaniel Shead --- gcc/cp/cp-gimplify.cc | 23 --- gcc/cp/cp-tree.h | 8 ++- gcc/cp/semantics.cc

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

2023-07-22 Thread Nathaniel Shead via Gcc-patches
: New test. * g++.dg/cpp1y/constexpr-lifetime4.C: New test. * g++.dg/cpp1y/constexpr-lifetime5.C: New test. * g++.dg/cpp1y/constexpr-lifetime6.C: New test. Signed-off-by: Nathaniel Shead --- gcc/cp/constexpr.cc | 128 -- .../g+

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

2023-08-07 Thread Nathaniel Shead via Gcc-patches
.dg/cpp0x/decltype-100482.C: New test. Signed-off-by: Nathaniel Shead --- gcc/cp/parser.cc | 22 ++-- gcc/testsuite/g++.dg/cpp0x/decltype-100482.C | 12 +++ 2 files changed, 23 insertions(+), 11 deletions(-) create mode 100644 gcc/testsuite/g++

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

2023-08-07 Thread Nathaniel Shead via Gcc-patches
* parser.cc (cp_parser_decltype_expr): Report errors raised by finish_id_expression. gcc/testsuite/ChangeLog: * g++.dg/cpp0x/decltype-100482.C: New test. Signed-off-by: Nathaniel Shead --- gcc/cp/parser.cc | 22 ++-- gcc/testsuite/g++.dg/c

[PATCH] c++: Check for indirect change of active union member in constexpr [PR101631]

2023-08-29 Thread Nathaniel Shead via Gcc-patches
testsuite/ChangeLog: * g++.dg/cpp2a/constexpr-union2.C: New test. * g++.dg/cpp2a/constexpr-union3.C: New test. * g++.dg/cpp2a/constexpr-union4.C: New test. * g++.dg/cpp2a/constexpr-union5.C: New test. Signed-Off-By: Nathaniel Shead --- gcc/cp/call.cc

[PATCH v2] c++: Catch indirect change of active union member in constexpr [PR101631]

2023-09-01 Thread Nathaniel Shead via Gcc-patches
On Wed, Aug 30, 2023 at 04:28:18PM -0400, Jason Merrill wrote: > On 8/29/23 09:35, Nathaniel Shead wrote: > > This is an attempt to improve the constexpr machinery's handling of > > union lifetime by catching more cases that cause UB. Is this approach > > OK? > >

[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 series

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

2023-06-13 Thread Nathaniel Shead via Gcc-patches
(Another) ping. On Sun, Apr 30, 2023 at 12:00:05PM +1000, Nathaniel Shead wrote: > This patch ensures that any errors raised by finish_id_expression when > parsing a decltype expression are properly reported, rather than > potentially going ignored and causing invalid code to be accepted

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

2023-06-13 Thread Nathaniel Shead via Gcc-patches
(Another) 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) specif

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

2023-06-24 Thread Nathaniel Shead via Gcc-patches
On Fri, Jun 23, 2023 at 11:59:51AM -0400, Patrick Palka wrote: > Hi, > > On Sat, 22 Apr 2023, Nathaniel Shead via Gcc-patches wrote: > > > Bootstrapped and tested on x86_64-pc-linux-gnu. > > > > -- 8< -- > > > > This patch raises an error early whe

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

2023-06-24 Thread Nathaniel Shead via Gcc-patches
On Fri, Jun 23, 2023 at 12:15:32PM -0400, Patrick Palka wrote: > On Sun, 30 Apr 2023, Nathaniel Shead via Gcc-patches wrote: > > > This patch ensures that any errors raised by finish_id_expression when > > parsing a decltype expression are properly reported, rather than >

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

2023-06-24 Thread Nathaniel Shead via Gcc-patches
On Fri, Jun 23, 2023 at 12:43:21PM -0400, Patrick Palka wrote: > On Wed, 29 Mar 2023, Nathaniel Shead via Gcc-patches wrote: > > > This adds rudimentary lifetime tracking in C++ constexpr contexts, > > allowing the compiler to report errors with using values after their > &

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

2023-06-30 Thread Nathaniel Shead via Gcc-patches
On Thu, Jun 29, 2023 at 01:43:07PM -0400, Jason Merrill wrote: > On 6/24/23 09:24, Nathaniel Shead wrote: > > On Fri, Jun 23, 2023 at 11:59:51AM -0400, Patrick Palka wrote: > > > Hi, > > > > > > On Sat, 22 Apr 2023, Nathaniel Shead via Gcc-patches wrote: >

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

2023-06-30 Thread Nathaniel Shead via Gcc-patches
On Mon, Jun 26, 2023 at 03:37:32PM -0400, Patrick Palka wrote: > On Sun, 25 Jun 2023, Nathaniel Shead wrote: > > > On Fri, Jun 23, 2023 at 12:43:21PM -0400, Patrick Palka wrote: > > > On Wed, 29 Mar 2023, Nathaniel Shead via Gcc-patches wrote: > > > > >

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

2023-06-30 Thread Nathaniel Shead via Gcc-patches
On Fri, Jun 23, 2023 at 01:09:14PM -0400, Patrick Palka wrote: > On Wed, 29 Mar 2023, Nathaniel Shead via Gcc-patches wrote: > > > This patch caches the current expression's location information in the > > constexpr_global_ctx struct, which allows subexpressions that

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

2023-06-30 Thread Nathaniel Shead via Gcc-patches
e location information down to subexpressions instead of manually saving and falling back to a parent expression's location. - Update more tests with improved error location information. Bootstrapped and regtested on x86_64-pc-linux-gnu. --- Nathaniel Shead (3): c++: Track lifetimes in c

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

2023-06-30 Thread Nathaniel Shead via Gcc-patches
/ChangeLog: * g++.dg/cpp1y/constexpr-lifetime1.C: New test. * g++.dg/cpp1y/constexpr-lifetime2.C: New test. * g++.dg/cpp1y/constexpr-lifetime3.C: New test. * g++.dg/cpp1y/constexpr-lifetime4.C: New test. * g++.dg/cpp1y/constexpr-lifetime5.C: New test. Signed-off-by:

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

2023-06-30 Thread Nathaniel Shead via Gcc-patches
me5.C: Test 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 ++

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

2023-06-30 Thread Nathaniel Shead via Gcc-patches
Likewise. * g++.dg/ext/constexpr-vla3.C: Likewise. * g++.dg/ubsan/pr63956.C: Likewise. Signed-off-by: Nathaniel Shead --- gcc/cp/constexpr.cc | 46 ++- gcc/testsuite/g++.dg/cpp0x/constexpr-48089.C | 10 ++-- gcc/testsuite/g++.dg/cpp0x/con

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

2023-07-16 Thread Nathaniel Shead via Gcc-patches
On Fri, Jul 14, 2023 at 11:16:58AM -0400, Jason Merrill wrote: > On 6/30/23 23:28, Nathaniel Shead via Gcc-patches wrote: > > This adds rudimentary lifetime tracking in C++ constexpr contexts, > > Thanks! > > I'm not seeing either a copyright assignment or DCO certifica

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

2023-07-20 Thread Nathaniel Shead via Gcc-patches
of empty classes outside lifetime and associated test - Add reference to PR c++/110619 for the second patch, and corresponding new test case Bootstrapped and regtested on x86_64-pc-linux-gnu. Nathaniel Shead (3): c++: Track lifetimes in constant evaluation [PR70331,PR96630,PR98675] c

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

2023-07-20 Thread Nathaniel Shead via Gcc-patches
: New test. * g++.dg/cpp1y/constexpr-lifetime4.C: New test. * g++.dg/cpp1y/constexpr-lifetime5.C: New test. * g++.dg/cpp1y/constexpr-lifetime6.C: New test. Signed-off-by: Nathaniel Shead --- gcc/cp/constexpr.cc | 132 -- .../g+

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

2023-07-20 Thread Nathaniel Shead via Gcc-patches
+.dg/cpp1y/constexpr-lifetime5.C: Test reported message is correct. * g++.dg/cpp1y/constexpr-lifetime6.C: Likewise. * g++.dg/cpp1y/constexpr-110619.C: New test. * g++.dg/warn/Wreturn-local-addr-6.C: Remove check for return value optimisation. Signed-off-by: Natha

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

2023-07-20 Thread Nathaniel Shead via Gcc-patches
ext/constexpr-vla2.C: Likewise. * g++.dg/ext/constexpr-vla3.C: Likewise. * g++.dg/ubsan/pr63956.C: Likewise. Signed-off-by: Nathaniel Shead --- gcc/cp/constexpr.cc | 46 ++- gcc/testsuite/g++.dg/cpp0x/constexpr-48089.C | 10 ++-- gcc/testsuite/

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

2023-07-20 Thread Nathaniel Shead via Gcc-patches
On Thu, Jul 20, 2023 at 11:46:47AM -0400, Jason Merrill wrote: > On 7/20/23 05:36, Nathaniel Shead wrote: > > Currently, when typeck discovers that a return statement will refer to a > > local variable it rewrites to return a null pointer. This causes the > > error messages

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: [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!)

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 >

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 raised

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

2023-03-28 Thread Nathaniel Shead via Gcc-patches
* testsuite/25_algorithms/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-di

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

2023-03-28 Thread Nathaniel Shead via Gcc-patches
erty. Another 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. --- Nath

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

2023-03-28 Thread Nathaniel Shead via Gcc-patches
time4.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 ++

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

2023-03-28 Thread Nathaniel Shead via Gcc-patches
me5.C: Test 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 ++

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 v2 2/3] c++: Improve constexpr error for dangling local variables

2023-03-28 Thread Nathaniel Shead via Gcc-patches
me5.C: Test 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 ++

[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 info

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

2023-03-28 Thread Nathaniel Shead via Gcc-patches
test. * 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/

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

2023-03-28 Thread Nathaniel Shead via Gcc-patches
* testsuite/25_algorithms/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-di

[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] c++: Fix ICE with parameter pack of decltype(auto) [PR103497]

2023-04-21 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 |

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

2022-12-28 Thread Nathaniel Shead via Gcc-patches
Signed-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/doxyge

[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] 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

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] libstdc++: Set active union member in constexpr std::string [PR103295]

2022-11-11 Thread Nathaniel Shead via Gcc-patches
Signed-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

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++: Add missing functions to [PR79700]

2023-02-20 Thread Nathaniel Shead via Gcc-patches
l, sqrtf, 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

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

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, Nathaniel Shead via Libstdc

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. > * testsui

<    1   2   3