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++/91618] [9/10/11 Regression] template-id required to friend a function template, even for a qualified-id Date: Wed, 03 May 2023 19:25:17 +0000 [thread overview] Message-ID: <bug-91618-4-JZZJ3w00tW@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-91618-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91618 --- Comment #15 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.
prev parent reply other threads:[~2023-05-03 19:25 UTC|newest] Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top [not found] <bug-91618-4@http.gcc.gnu.org/bugzilla/> 2020-08-29 15:06 ` [Bug c++/91618] " language.lawyer at gmail dot com 2020-11-04 15:51 ` redi at gcc dot gnu.org 2020-11-04 15:51 ` redi at gcc dot gnu.org 2021-12-13 16:06 ` pinskia at gcc dot gnu.org 2021-12-13 16:07 ` pinskia at gcc dot gnu.org 2021-12-13 16:09 ` [Bug c++/91618] [9/10/11/12 Regression] " pinskia at gcc dot gnu.org 2022-01-17 9:00 ` rguenth at gcc dot gnu.org 2022-04-07 15:59 ` jason at gcc dot gnu.org 2022-04-07 20:11 ` jason at gcc dot gnu.org 2022-04-09 1:51 ` cvs-commit at gcc dot gnu.org 2022-04-29 21:25 ` [Bug c++/91618] [9/10/11 " cvs-commit at gcc dot gnu.org 2022-05-13 15:29 ` jason at gcc dot gnu.org 2023-05-03 19:25 ` cvs-commit at gcc dot gnu.org [this message]
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-91618-4-JZZJ3w00tW@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).