From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id ABBA5385828D; Sat, 12 Aug 2023 01:13:41 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org ABBA5385828D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1691802821; bh=LmVMTztT/59R2MN0d/VUDYw7FlspFQJ+2iL1VrWrpgQ=; h=From:To:Subject:Date:In-Reply-To:References:From; b=QTGqg43CFsb8PZtiqN6IYfzyg/Z/JhfGFUqlwoOz/lyYFwZLPbs7GSs8uaC5b9X9w V7W7Vcq/q8TJZm9Hb/PpllulAGN/vAVnYIzbIvvZuR1xg252JnHVodisHBwXYmk3mo nV1QNmANBIZ9NBCfJtuN1nw0iJ3bcoHiHUzrUKtA= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/106604] Fully-specified deduction guide in anonymous namespace warns as-if a function? Unsuppressably? Date: Sat, 12 Aug 2023 01:13:38 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D106604 --- Comment #3 from CVS Commits --- The master branch has been updated by Patrick Palka : https://gcc.gnu.org/g:f50f603cbfd05653555e9856360c83108bbd1d8a commit r14-3175-gf50f603cbfd05653555e9856360c83108bbd1d8a Author: Patrick Palka Date: Fri Aug 11 21:13:23 2023 -0400 c++: bogus warning w/ deduction guide in anon ns [PR106604] Here we're unintentionally issuing a "declared static but never defined" warning from wrapup_namespace_globals for a deduction guide declared in an anonymous namespace. This patch fixes this by giving deduction guid= es a dummy DECL_INITIAL, which suppresses the warning and also allows us to simplify redeclaration checking for them. Co-authored-by: Jason Merrill PR c++/106604 gcc/cp/ChangeLog: * decl.cc (redeclaration_error_message): Remove special handling for deduction guides. (grokfndecl): Give deduction guides a dummy DECL_INITIAL. gcc/testsuite/ChangeLog: * g++.dg/cpp1z/class-deduction74.C: Expect "defined" instead of "declared" in the repeated deduction guide diagnostics. * g++.dg/cpp1z/class-deduction116.C: New test.=