https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106604

--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Patrick Palka <ppa...@gcc.gnu.org>:

https://gcc.gnu.org/g:f50f603cbfd05653555e9856360c83108bbd1d8a

commit r14-3175-gf50f603cbfd05653555e9856360c83108bbd1d8a
Author: Patrick Palka <ppa...@redhat.com>
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 guides
    a dummy DECL_INITIAL, which suppresses the warning and also allows us to
    simplify redeclaration checking for them.

    Co-authored-by: Jason Merrill <ja...@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.
  • [Bug c++/106604] Fully-specifie... cvs-commit at gcc dot gnu.org via Gcc-bugs

Reply via email to