2009-11-13 Jason Merrill <jason@redhat.com>
+ PR c++/27425
+ PR c++/34274
+ * pt.c (expand_template_argument_pack): Handle null arg gracefully.
+ (convert_template_argument): Use %T for type.
+
PR c++/29363
* decl.c (create_implicit_typedef): Set TYPE_STUB_DECL here.
(cxx_init_decl_processing): Not here.
for (in_arg = 0; in_arg < nargs; ++in_arg)
{
tree arg = TREE_VEC_ELT (args, in_arg);
+ if (arg == NULL_TREE)
+ return args;
if (ARGUMENT_PACK_P (arg))
{
int num_packed = TREE_VEC_LENGTH (ARGUMENT_PACK_ARGS (arg));
error ("type/value mismatch at argument %d in "
"template parameter list for %qD",
i + 1, in_decl);
- error (" expected a template of type %qD, got %qD",
+ error (" expected a template of type %qD, got %qT",
parm, orig_arg);
}
2009-11-13 Jason Merrill <jason@redhat.com>
+ PR c++/27425
+ PR c++/34274
+ * g++.dg/template/arg7.C: New.
+
PR c++/29363
* g++.dg/template/error43.C: New.
--- /dev/null
+// PR c++/27425, 34274
+
+template<typename T> struct A
+{
+ template<template<T> class> struct B {}; // { dg-error "void|mismatch|expected" }
+ // { dg-bogus "not supported" "" { target *-*-* } 5 }
+ template<T> struct C; // { dg-error "void" }
+ B<C> b;
+};
+
+A<void> a; // { dg-message "instantiated" }