Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/g++.dg/cpp1y/auto-fn8.C @ 111:04ced10e8804
gcc 7
author | kono |
---|---|
date | Fri, 27 Oct 2017 22:46:09 +0900 |
parents | |
children |
rev | line source |
---|---|
111 | 1 // { dg-do compile { target c++14 } } |
2 | |
3 auto f() { return 42; } // { dg-message "old declaration .auto" } | |
4 auto f(); // OK | |
5 int f(); // { dg-error "new declaration" } | |
6 | |
7 template <class T> auto f(T t) { return t; } | |
8 template <class T> T f(T t); | |
9 | |
10 int main() | |
11 { | |
12 f(42); // { dg-error "ambiguous" } | |
13 } |