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
This commit is contained in:
parent
cc16324749
commit
23c74efa5f
@ -1,3 +1,8 @@
|
||||
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
|
||||
|
@ -1,3 +1,8 @@
|
||||
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
|
||||
|
12
gcc/testsuite/g++.dg/cpp0x/auto31.C
Normal file
12
gcc/testsuite/g++.dg/cpp0x/auto31.C
Normal file
@ -0,0 +1,12 @@
|
||||
// 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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user