Commit 23c74efa by Jason Merrill Committed by Jason Merrill

re PR c++/51416 ([c++0x] [4.6/4.7 Regression] ICE with invalid use of auto)

	PR c++/51416
	* init.c (build_value_init_noctor): Check for incomplete type.

From-SVN: r182430
parent cc163247
2011-12-16 Jason Merrill <jason@redhat.com>
PR c++/51416
* init.c (build_value_init_noctor): Check for incomplete type.
2011-12-16 Richard Henderson <rth@redhat.com>
PR bootstrap/51072
......
2011-12-16 Jason Merrill <jason@redhat.com>
PR c++/51416
* g++.dg/cpp0x/auto31.C: New.
2011-12-16 Ian Lance Taylor <iant@google.com>
PR middle-end/51592
......
// PR c++/51416
// { dg-do compile { target c++11 } }
template<typename T, typename... U> void foo(T, U... u)
{
auto foo(u...); // { dg-error "auto" }
}
void bar()
{
foo(0);
}
......@@ -5,7 +5,7 @@ T&& create();
template<class T, class... Args>
void test() {
T t(create<Args>()...); // { dg-error "unknown bound" }
T t(create<Args>()...); // { dg-error "incomplete" }
(void) t;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment