aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-cfg.cc
diff options
context:
space:
mode:
authorPatrick Palka <ppalka@redhat.com>2023-08-11 21:13:23 -0400
committerPatrick Palka <ppalka@redhat.com>2023-08-11 21:13:23 -0400
commitf50f603cbfd05653555e9856360c83108bbd1d8a (patch)
tree99f332955c64ae70746baa6c6782dcc9a4e7898a /gcc/tree-cfg.cc
parent066c260ad09dde95f43e503f7242b011d17a10f6 (diff)
downloadgcc-f50f603cbfd05653555e9856360c83108bbd1d8a.zip
gcc-f50f603cbfd05653555e9856360c83108bbd1d8a.tar.gz
gcc-f50f603cbfd05653555e9856360c83108bbd1d8a.tar.bz2
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 guides a dummy DECL_INITIAL, which suppresses the warning and also allows us to simplify redeclaration checking for them. Co-authored-by: Jason Merrill <jason@redhat.com> 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.
Diffstat (limited to 'gcc/tree-cfg.cc')
0 files changed, 0 insertions, 0 deletions