OSDN Git Service

Pizza-lize :-)
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.dg / other / cv_func.C
1 // { dg-do compile }
2
3 typedef int FIC(int) const;
4 typedef int FI(int);
5
6 FIC f; // { dg-error "qualified" }
7 struct S {
8   FIC f; // OK
9
10   const FI g;
11
12   int h(int) const;
13
14 };
15 FIC S::*pm = &S::f;
16 const FI S::*pm2 = &S::f; // { dg-error "cannot convert" }
17 const FIC S::*pm3 = &S::f;
18
19 int S::f(int) const
20 {
21   return 17;
22 }
23
24
25 int foo(float) const // { dg-error "qualifier" }
26 {
27   return 0;
28 }
29
30 int bar(float) volatile; // { dg-error "qualifier" }