+2011-12-16 Jason Merrill <jason@redhat.com>
+
+ PR c++/51416
+ * init.c (build_value_init_noctor): Check for incomplete type.
+
2011-12-16 Jason Merrill <jason@redhat.com>
PR c++/51331
tree
build_value_init_noctor (tree type, tsubst_flags_t complain)
{
+ if (!COMPLETE_TYPE_P (type))
+ {
+ if (complain & tf_error)
+ error ("value-initialization of incomplete type %qT", type);
+ return error_mark_node;
+ }
if (CLASS_TYPE_P (type))
{
gcc_assert (!TYPE_NEEDS_CONSTRUCTING (type));
+2011-12-16 Jason Merrill <jason@redhat.com>
+
+ PR c++/51416
+ * g++.dg/cpp0x/auto31.C: New.
+
2011-12-16 Jason Merrill <jason@redhat.com>
PR c++/51331
--- /dev/null
+// PR c++/51416
+// { dg-options "-std=c++0x" }
+
+template<typename T, typename... U> void foo(T, U... u)
+{
+ auto foo(u...); // { dg-error "auto" }
+}
+
+void bar()
+{
+ foo(0);
+}
template<class T, class... Args>
void test() {
- T t(create<Args>()...); // { dg-error "unknown bound" }
+ T t(create<Args>()...); // { dg-error "incomplete" }
(void) t;
}