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++/96330] Constexpr variables cannot be used in the template context. Date: Sat, 06 Mar 2021 05:08:14 +0000 [thread overview] Message-ID: <bug-96330-4-1SnXf5UuZ4@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-96330-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96330 --- 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:574e7601829733d7cae20b5dc7034b876cc76b30 commit r11-7541-g574e7601829733d7cae20b5dc7034b876cc76b30 Author: Patrick Palka <ppalka@redhat.com> Date: Sat Mar 6 00:07:43 2021 -0500 c++: Fix tsubsting member variable template-id [PR96330] This makes tsubst_copy appropriately handle a variable template-id, which in turn fixes tsubsting a COMPONENT_REF whose member operand is known at parse time to be a variable template-id, as in the initialization of 'x' in the first testcase. Previously, we rejected this testcase with the error "foo_t::bar<T> is not a function template", issued from lookup_template_fuction. We were already properly handling the analagous case where the object operand of the COMPONENT_REF is dependent (and so the member operand is a dependent template name), but there doesn't seems to be existing test coverage for this, hence the second testcase below. gcc/cp/ChangeLog: PR c++/96330 * pt.c (tsubst_copy) <case TEMPLATE_ID_EXPR>: Rename local variable 'fn' to 'tmpl'. Handle a variable template-id by calling lookup_template_variable. gcc/testsuite/ChangeLog: PR c++/96330 * g++.dg/cpp1y/var-templ68.C: New test. * g++.dg/cpp1y/var-templ68a.C: New test. Co-authored-by: Jakub Jelinek <jakub@redhat.com>
next prev parent reply other threads:[~2021-03-06 5:08 UTC|newest] Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-07-27 11:55 [Bug c++/96330] New: " steve_green at qq dot com 2020-07-27 15:35 ` [Bug c++/96330] " jakub at gcc dot gnu.org 2021-03-05 16:43 ` ppalka at gcc dot gnu.org 2021-03-06 5:08 ` cvs-commit at gcc dot gnu.org [this message] 2021-03-06 15:26 ` 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-96330-4-1SnXf5UuZ4@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).