Reverting merge from trunk
[official-gcc.git] / gcc / testsuite / g++.dg / cpp1y / auto-fn8.C
blob072f6145a2876f2484309c78b9a4894e67f97c73
1 // { dg-options "-std=c++1y -pedantic-errors" }
3 auto f() { return 42; }         // { dg-error "old declaration .auto" }
4 auto f();                       // OK
5 int f();                        // { dg-error "new declaration" }
7 template <class T> auto f(T t) { return t; }
8 template <class T> T f(T t);
10 int main()
12   f(42);                        // { dg-error "ambiguous" }