From: Jason Merrill <jason@redhat.com>
To: Dodji Seketeli <dodji@redhat.com>
Cc: Paolo Carlini <pcarlini@gmail.com>,
"H.J. Lu" <hjl.tools@gmail.com>,
GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: Require canonical type comparison for typedefs again.
Date: Thu, 21 Oct 2010 01:06:00 -0000 [thread overview]
Message-ID: <4CBF80E3.8080206@redhat.com> (raw)
In-Reply-To: <m3eibkmtps.fsf@tutu.torimasen.com>
On 10/20/2010 05:37 PM, Dodji Seketeli wrote:
> + /* Only substitute into template non-type parms. */
> + if (parameter != NULL_TREE
> + && TREE_CODE (parameter) == TREE_LIST
> + && (TREE_CODE (TREE_VALUE (parameter)) == TYPE_DECL
> + || TREE_CODE (TREE_VALUE (parameter)) == TEMPLATE_DECL))
> + continue;
> +
> + if (!dependent_type_p (TREE_TYPE (TREE_VALUE (parameter))))
> + continue;
These optimizations seem unsafe:
template <class T, template <class U = T> class V> ...
template <class T, template <int I = T()> class U> ...
Let's handle all parms, and check in fixup_template_parm* to see if a
parm has the right NUM_SIBLINGS before we try to adjust it; I would
expect that the parms of a template template parm will already have
NUM_SIBLINGS set properly, we just need to substitute in the outer parms.
> + Consider the level of the parms of TT; T and U both have
> + level 2; TT has no template parm of level 1. So in this case
> + the first element of full_template_args is NULL_TREE. If we
> + leave it like this TMPL_ARG_DEPTH on args returns 1 instead
> + of 2. This will make tsubst wrongly consider that T and U
> + have level 1. Instead, let's create a dummy vector as the
> + first element of full_template_args so that TMPL_ARG_DEPTH
> + returns the correct depth for args.
> + */
The */ should go on the last line of text, not on a line by itself.
Jason
next prev parent reply other threads:[~2010-10-20 23:53 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-11 18:30 [Dodji Seketeli] Patch PR c++/45200 Dodji Seketeli
2010-08-11 21:04 ` Jason Merrill
2010-08-11 21:06 ` Andrew Pinski
2010-08-12 13:20 ` Dodji Seketeli
2010-08-12 14:35 ` Jason Merrill
2010-08-13 10:30 ` Dodji Seketeli
2010-08-13 15:09 ` Jason Merrill
2010-09-19 22:34 ` Require canonical type comparison for typedefs again. (was Patch PR c++/45200) Dodji Seketeli
2010-09-19 22:47 ` Paolo Carlini
2010-09-20 10:28 ` Require canonical type comparison for typedefs again Dodji Seketeli
2010-09-20 15:35 ` H.J. Lu
2010-09-20 17:07 ` Dodji Seketeli
2010-09-20 21:44 ` Jason Merrill
2010-09-26 14:44 ` Dodji Seketeli
2010-09-26 15:10 ` Jason Merrill
2010-09-28 15:12 ` Dodji Seketeli
2010-09-28 15:15 ` Dodji Seketeli
2010-09-28 16:51 ` Jason Merrill
2010-09-30 8:55 ` Dodji Seketeli
2010-09-30 9:10 ` Jason Merrill
2010-10-06 18:53 ` Dodji Seketeli
2010-10-06 22:15 ` Paolo Carlini
2010-10-15 16:09 ` Dodji Seketeli
2010-10-20 15:43 ` Jason Merrill
2010-10-20 21:10 ` Dodji Seketeli
2010-10-20 21:21 ` Jason Merrill
2010-10-20 22:06 ` Dodji Seketeli
2010-10-21 1:06 ` Jason Merrill [this message]
2010-10-23 22:46 ` Dodji Seketeli
2010-10-23 23:39 ` Jason Merrill
2010-10-24 2:33 ` Dodji Seketeli
2010-10-24 3:03 ` Jason Merrill
2010-10-25 11:52 ` Dodji Seketeli
2010-10-27 15:59 ` Dodji Seketeli
2010-10-28 17:54 ` Jason Merrill
2010-12-17 20:51 ` H.J. Lu
2011-10-28 21:47 ` H.J. Lu
2010-10-07 18:30 ` 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=4CBF80E3.8080206@redhat.com \
--to=jason@redhat.com \
--cc=dodji@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=hjl.tools@gmail.com \
--cc=pcarlini@gmail.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).