OSDN Git Service

PR c++/36628
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.dg / cpp0x / auto8.C
1 // PR c++/37967
2 // Negative test for auto
3 // { dg-options "-std=c++0x" }
4
5 auto f1 () -> int;
6 auto f2 ();             // { dg-error "without late return type" }
7 int f3 () -> int;       // { dg-error "late return type" }
8 auto *f4 () -> int;     // { dg-error "late return type" }
9
10 struct A
11 {
12   auto f5 () const -> int;
13   auto f6 ();           // { dg-error "without late return type" }
14   int f7 () -> int;     // { dg-error "late return type" }
15   auto *f8 () -> int;   // { dg-error "late return type" }
16 };