Merged revisions 208012,208018-208019,208021,208023-208030,208033,208037,208040-20804...
[official-gcc.git] / main / gcc / testsuite / g++.dg / cpp1y / auto-fn8.C
blob1badd6a5e81e19aeae455177fc9952d5ba1482c3
1 // { dg-do compile { target c++1y } }
3 auto f() { return 42; }         // { dg-message "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" }