+2007-10-11 Paolo Carlini <pcarlini@suse.de>
+
+ PR c++/33461
+ * pt.c (coerce_template_parameter_pack): Do not pass error_mark_node
+ to convert_template_argument.
+ (coerce_template_parms): Return error_mark_node after fixed-length
+ error.
+ (tsubst_decl): Check for error_mark_node the return value of the
+ first tsubst in 'case VAR_DECL'.
+
2007-10-08 Ollie Wild <aaw@google.com>
* typeck2.c (digest_init): Call cplus_expand_constant after
TREE_VEC_ELT (packed_types, arg_idx - parm_idx);
}
- arg = convert_template_argument (actual_parm,
- arg, new_args, complain, parm_idx,
- in_decl);
+ if (arg != error_mark_node)
+ arg = convert_template_argument (actual_parm,
+ arg, new_args, complain, parm_idx,
+ in_decl);
if (arg == error_mark_node)
(*lost)++;
TREE_VEC_ELT (packed_args, arg_idx - parm_idx) = arg;
else
error ("cannot expand %<%T%> into a fixed-length "
"argument list", arg);
+ return error_mark_node;
}
}
else if (require_all_args)
TYPE_NAME is not correct for the above test if
we've copied the type for a typedef. */
type = tsubst (TREE_TYPE (t), args, complain, in_decl);
+ if (type == error_mark_node)
+ return error_mark_node;
r = TYPE_NAME (type);
break;
}
+2007-10-11 Paolo Carlini <pcarlini@suse.de>
+
+ PR c++/31441
+ * g++.dg/cpp0x/variadic83.C: New.
+
+2007-10-11 Paolo Carlini <pcarlini@suse.de>
+
+ PR c++/33461
+ * g++.dg/cpp0x/variadic81.C: New.
+ * g++.dg/cpp0x/variadic82.C: Likewise.
+
2007-10-11 Richard Guenther <rguenther@suse.de>
PR middle-end/33724
--- /dev/null
+// PR c++/33461
+// { dg-options "-std=gnu++0x" }
+
+template<typename> struct A;
+
+template<typename... T> struct A<T*> // { dg-error "not expanded|note" }
+{ // { dg-error "not expanded|note" }
+ struct B;
+};
+
+A<void*> a;
--- /dev/null
+// PR c++/33461
+// { dg-options "-std=gnu++0x" }
+
+template<typename> struct A;
+
+template<typename... T> struct A<T*...> // { dg-error "cannot expand" }
+{
+ struct B;
+};
+
+A<void*> a; // { dg-error "incomplete type" }
--- /dev/null
+// PR c++/31441
+// { dg-options "-std=gnu++0x" }
+
+template<typename> struct A;
+
+template<typename... T> struct A<T...> { }; // { dg-error "cannot expand" }
+
+A<int> a; // { dg-error "incomplete type" }