From: Jason Merrill Date: Fri, 27 May 2011 04:01:56 +0000 (-0400) Subject: DR 1004 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5ac537d7b4983abe5eebe510c798bede816c8165;p=gcc.git DR 1004 DR 1004 * pt.c (convert_template_argument): Don't complain about using injected-class-name as template template argument. From-SVN: r174318 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 577273d3706..d5ad5010446 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,9 @@ 2011-05-26 Jason Merrill + DR 1004 + * pt.c (convert_template_argument): Don't complain about using + injected-class-name as template template argument. + PR c++/47956 * decl.c (check_static_variable_definition): Now static. (cp_finish_decl): Call it here. diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index 3b26700244d..28c82b80f42 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)