From: Jason Merrill <jason@redhat.com>
To: Marek Polacek <polacek@redhat.com>,
GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: C++ PATCH for c++/88184, ICE when treating name as template-name
Date: Thu, 29 Nov 2018 03:34:00 -0000 [thread overview]
Message-ID: <51f04722-f35d-7df0-40a3-dc7926c82981@redhat.com> (raw)
In-Reply-To: <20181128154849.GD3269@redhat.com>
On 11/28/18 10:48 AM, Marek Polacek wrote:
> Since P0846R0 was implemented, a name will be treated as a template-name when
> it is an unqualified-id followed by a < and name lookup finds either one or
> more functions or finds nothing, in order to potentially cause ADL to be performed.
>
> In this case, we had
>
> f<T> ();
>
> where we'd found a decl for f (not a TEMPLATE_DECL) and < follows.
From the backtrace in the PR, it seems as though we're treating f<T> as
non-dependent, which is wrong. type_dependent_expression_p only looks
at the arguments of a TEMPLATE_ID_EXPR if it has unknown_type_node, so
we probably want to give it that type.
Jason
next prev parent reply other threads:[~2018-11-29 3:34 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-28 15:48 Marek Polacek
2018-11-29 3:34 ` Jason Merrill [this message]
2018-11-29 18:28 ` Marek Polacek
2018-11-29 21:04 ` Jason Merrill
2018-12-04 17:27 ` Marek Polacek
2018-12-04 19:09 ` Jason Merrill
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=51f04722-f35d-7df0-40a3-dc7926c82981@redhat.com \
--to=jason@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=polacek@redhat.com \
/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).