Remove outermost loop parameter.
[official-gcc/graphite-test-results.git] / gcc / testsuite / g++.dg / cpp0x / auto3.C
blobf792c07b169af9a8b07c6e1c12decec27063ead5
1 // Negative test for auto
2 // { dg-options "-std=c++0x" }
4 #include <initializer_list>
6 auto x;                         // { dg-error "auto" }
8 // If the type deduced for the template parameter U is not the same in each
9 // deduction, the program is ill-formed.
10 auto i = 42, j = 42.0;          // { dg-error "auto" }
12 // New CWG issue
13 auto a[2] = { 1, 2 };           // { dg-error "auto" }
15 template<class T>
16 struct A { };
18 A<int> A1;
19 // CWG issue 625
20 A<auto> A2 = A1;                // { dg-error "" }
22 auto foo() { }                  // { dg-error "auto" }
24 void bar(auto i)                // { dg-error "incomplete|auto" }
26   (void)i;