2018-11-07 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / g++.dg / cpp1y / auto-fn8.C
blob651c66cb297a539a446cc1dea26e60760860a56a
1 // { dg-do compile { target c++14 } }
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" }