public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jason Merrill <jason@redhat.com>
To: Doug Gregor <doug.gregor@gmail.com>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: PING: C++0x variadic templates fixes
Date: Fri, 17 Aug 2007 19:29:00 -0000	[thread overview]
Message-ID: <46C5F718.3060304@redhat.com> (raw)
In-Reply-To: <24b520d20707251230r2de5b868l85159e833b1490e9@mail.gmail.com>

Doug Gregor wrote:
> These patches fix a few PRs against logged against variadic templates:
> 
>  http://gcc.gnu.org/ml/gcc-patches/2007-07/msg00170.html

> +			  init = build_default_init (TREE_TYPE (decl), 
> +						     integer_one_node);

Why integer_one_node?  NULL_TREE seems more appropriate.

 >  http://gcc.gnu.org/ml/gcc-patches/2007-07/msg00365.html

> 	(tsubst_pack_expansion): We our substitution of a parameter pack
> 	is a "trivial" substitution of itself, just substitute into the

We?

Your changes to convert_template_argument cause check_arg to be used 
much more.  Do we still need the distinction between arg and check_arg?

> +          if ((TYPE_P (pattern) && same_type_p (pattern, parm_pack))
> +              || (!TYPE_P (pattern) && cp_tree_equal (parm_pack, pattern)))
> +            /* The argument pack that the parameter maps to is just an
> +               expansion of the parameter itself, such as one would
> +               find in the implicit typedef of a class inside the
> +               class itself.  Consider this parameter "unsubstituted",
> +               so that we will maintain the outer pack expansion.  */

> +                /* We can get a pack expansion here when we are
> +                   instantiating a member template and ARG is a pack
> +                   expansion from the outer template.  */
> +                if (PACK_EXPANSION_P (arg))
> +                  arg = PACK_EXPANSION_PATTERN (arg);

Can you give me an example of how these two situations come up?  It's 
not clear to me how the testcases relate to the fixes.

Jason

  reply	other threads:[~2007-08-17 19:29 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-25 19:40 Doug Gregor
2007-08-17 19:29 ` Jason Merrill [this message]
2007-08-31 19:42   ` Doug Gregor
2007-10-26 18:24   ` Doug Gregor
2007-10-30  7:12     ` 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=46C5F718.3060304@redhat.com \
    --to=jason@redhat.com \
    --cc=doug.gregor@gmail.com \
    --cc=gcc-patches@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: 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).