]>
Commit | Line | Data |
---|---|---|
84bafc8d DG |
1 | // { dg-do compile } |
2 | // { dg-options "-pedantic -pedantic-errors" } | |
3 | typedef int FIC(int) const; | |
4 | typedef int FI(int); | |
5 | ||
6 | FIC f; // { dg-error "qualified" } | |
84bafc8d DG |
7 | struct S { |
8 | FIC f; // OK | |
9 | ||
10 | const FI g; // { dg-error "qualifier" } | |
11 | ||
12 | int h(int) const; | |
13 | ||
14 | }; | |
15 | FIC S::*pm = &S::f; | |
16 | const FI S::*pm2 = &S::f; // { dg-error "qualifier" } | |
e4672ccd | 17 | // { dg-error "cannot convert" "cannot convert" { target *-*-* } 16 } |
84bafc8d DG |
18 | const FIC S::*pm3 = &S::f; // { dg-error "qualifier" } |
19 | ||
20 | int S::f(int) const | |
21 | { | |
22 | return 17; | |
23 | } | |
24 | ||
25 | ||
26 | int foo(float) const // { dg-error "qualifier" } | |
27 | { | |
28 | return 0; | |
29 | } | |
30 | ||
31 | int bar(float) volatile; // { dg-error "qualifier" } |