Re: [PATCH] c++: bogus warning w/ deduction guide in anon ns [PR106604]

2023-08-11 Thread Jason Merrill via Gcc-patches
{ dg-message "previously defined here|old declaration" } | ^ -- >8 -- Subject: [PATCH] c++: bogus warning w/ deduction guide in anon ns [PR106604] Here we're unintentionally issuing a "declared static but never defined" warning for a deduction guide declared in a

Re: [PATCH] c++: bogus warning w/ deduction guide in anon ns [PR106604]

2023-08-11 Thread Patrick Palka via Gcc-patches
dg-message "previously defined here|old declaration" } | ^ After src/gcc/testsuite/g++.dg/cpp1z/class-deduction74.C:11:1: error: redefinition of ‘S()-> S’ 11 | S() -> S; // { dg-error "redefinition" } | ^ src/gcc/testsuite/g++.dg/cpp1z/class-de

Re: [PATCH] c++: bogus warning w/ deduction guide in anon ns [PR106604]

2023-08-10 Thread Jason Merrill via Gcc-patches
On 8/10/23 16:40, Patrick Palka wrote: On Thu, 10 Aug 2023, Jason Merrill wrote: On 8/10/23 12:09, Patrick Palka wrote: Booststrapped and regtested on x86_64-pc-linux-gnu, does this look OK for trunk and perhaps 13? -- >8 -- We shouldn't issue a "declared static but never defined" warning

Re: [PATCH] c++: bogus warning w/ deduction guide in anon ns [PR106604]

2023-08-10 Thread Patrick Palka via Gcc-patches
On Thu, 10 Aug 2023, Jason Merrill wrote: > On 8/10/23 12:09, Patrick Palka wrote: > > Booststrapped and regtested on x86_64-pc-linux-gnu, does this look OK for > > trunk and perhaps 13? > > > > -- >8 -- > > > > We shouldn't issue a "declared static but never defined" warning > > for a

Re: [PATCH] c++: bogus warning w/ deduction guide in anon ns [PR106604]

2023-08-10 Thread Jason Merrill via Gcc-patches
On 8/10/23 12:09, Patrick Palka wrote: Booststrapped and regtested on x86_64-pc-linux-gnu, does this look OK for trunk and perhaps 13? -- >8 -- We shouldn't issue a "declared static but never defined" warning for a deduction guide (declared in an anonymous namespace). PR c++/106604

[PATCH] c++: bogus warning w/ deduction guide in anon ns [PR106604]

2023-08-10 Thread Patrick Palka via Gcc-patches
Booststrapped and regtested on x86_64-pc-linux-gnu, does this look OK for trunk and perhaps 13? -- >8 -- We shouldn't issue a "declared static but never defined" warning for a deduction guide (declared in an anonymous namespace). PR c++/106604 gcc/cp/ChangeLog: * decl.cc