public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.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	[thread overview]
Message-ID: <bug-106604-4-Uhug0v89dW@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-106604-4@http.gcc.gnu.org/bugzilla/>

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 <ppalka@gcc.gnu.org>:

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

commit r14-3175-gf50f603cbfd05653555e9856360c83108bbd1d8a
Author: Patrick Palka <ppalka@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 <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.

  parent reply	other threads:[~2023-08-12  1:13 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-13  0:17 [Bug c++/106604] New: " nabijaczleweli at nabijaczleweli dot xyz
2022-08-14 19:36 ` [Bug c++/106604] " pinskia at gcc dot gnu.org
2023-05-19  4:19 ` pinskia at gcc dot gnu.org
2023-08-12  1:13 ` cvs-commit at gcc dot gnu.org [this message]
2023-08-15 13:19 ` ppalka at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-106604-4-Uhug0v89dW@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).