Daily bump.
[gcc.git] / gcc / testsuite / g++.dg / cpp0x / trailing2.C
blob848626a90d747a0dde303d3ad8e63e44a0f89a7a
1 // PR c++/37967
2 // Negative test for auto
3 // { dg-do compile { target c++11 } }
5 auto f1 () -> int;
6 auto f2 ();             // { dg-error "1:.f2. function uses .auto. type specifier without trailing return type" "" { target { ! c++14 } } }
7 int f3 () -> int;       // { dg-error "1:.f3. function with trailing return type" }
8 auto *f4 () -> int;     // { dg-error "1:.f4. function with trailing return type" }
10 struct A
12   auto f5 () const -> int;
13   auto f6 ();           // { dg-error "3:.f6. function uses .auto. type specifier without trailing return type" "" { target { ! c++14 } } }
14   int f7 () -> int;     // { dg-error "3:.f7. function with trailing return type" }
15   auto *f8 () -> int;   // { dg-error "3:.f8. function with trailing return type" }