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++/109649] [13/14 Regression] GCC accepts invalid inaccessible friend declaration of member function Date: Wed, 03 May 2023 19:25:17 +0000 [thread overview] Message-ID: <bug-109649-4-t0oXqSClTU@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-109649-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109649 --- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The trunk branch has been updated by Jason Merrill <jason@gcc.gnu.org>: https://gcc.gnu.org/g:7ce078ceca42f184f6f60c3ca921b6e07cf2c4bd commit r14-460-g7ce078ceca42f184f6f60c3ca921b6e07cf2c4bd Author: Jason Merrill <jason@redhat.com> Date: Wed May 3 13:32:55 2023 -0400 c++: over-eager friend matching [PR109649] A bug in the simplification I did around 91618; at this point X<int>::f has DECL_IMPLICIT_INSTANTIATION set, but we've already identified what template it corresponds to, so we don't want to call check_explicit_specialization. To distinguish this case we need to look at DECL_TI_TEMPLATE. grokfndecl has for a long time set it to the OVERLOAD in this case, while the new cases I added for 91618 were leaving DECL_TEMPLATE_INFO null; let's adjust them to match. PR c++/91618 PR c++/109649 gcc/cp/ChangeLog: * friend.cc (do_friend): Don't call check_explicit_specialization if DECL_TEMPLATE_INFO is already set. * decl2.cc (check_classfn): Set DECL_TEMPLATE_INFO. * name-lookup.cc (set_decl_namespace): Likewise. gcc/testsuite/ChangeLog: * g++.dg/template/friend77.C: New test.
next prev parent reply other threads:[~2023-05-03 19:25 UTC|newest] Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-04-27 15:51 [Bug c++/109649] New: " jlame646 at gmail dot com 2023-04-27 15:58 ` [Bug c++/109649] [13/14 Regression] " pinskia at gcc dot gnu.org 2023-04-27 16:07 ` mpolacek at gcc dot gnu.org 2023-05-03 17:12 ` jason at gcc dot gnu.org 2023-05-03 19:24 ` cvs-commit at gcc dot gnu.org 2023-05-03 19:25 ` cvs-commit at gcc dot gnu.org [this message] 2023-05-03 19:25 ` jason 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-109649-4-t0oXqSClTU@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: linkBe 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).