public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jason Merrill <jason@redhat.com>
To: gcc-patches List <gcc-patches@gcc.gnu.org>
Subject: Re: C++ PATCH for c++/47721 (N1791, friend T)
Date: Fri, 27 May 2011 07:35:00 -0000	[thread overview]
Message-ID: <4DDF2180.9050408@redhat.com> (raw)
In-Reply-To: <4DDF2129.8010608@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 212 bytes --]

And as a prerequisite for that testcase, I needed to implement DR 1004, 
dropping the pedwarn about using an injected class name as a template 
template parameter.

Tested x86_64-pc-linux-gnu, applying to trunk.

[-- Attachment #2: dr1004.patch --]
[-- Type: text/x-patch, Size: 871 bytes --]

commit 0407c6ff58d0e7033de64040ce66d60a85b709e5
Author: Jason Merrill <jason@redhat.com>
Date:   Thu May 26 15:00:08 2011 -0400

    	DR 1004
    	* pt.c (convert_template_argument): Don't complain about using
    	injected-class-name as template template argument.

diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index 3b26700..28c82b8 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -5962,7 +5962,9 @@ convert_template_argument (tree parm,
       tree t = maybe_get_template_decl_from_type_decl (TYPE_NAME (arg));
       if (TREE_CODE (t) == TEMPLATE_DECL)
 	{
-	  if (complain & tf_warning_or_error)
+	  if (cxx_dialect >= cxx0x)
+	    /* OK under DR 1004.  */;
+	  else if (complain & tf_warning_or_error)
 	    pedwarn (input_location, OPT_pedantic, "injected-class-name %qD"
 		     " used as template template argument", TYPE_NAME (arg));
 	  else if (flag_pedantic_errors)

      reply	other threads:[~2011-05-27  3:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-27  7:32 Jason Merrill
2011-05-27  7:35 ` Jason Merrill [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=4DDF2180.9050408@redhat.com \
    --to=jason@redhat.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).