]> gcc.gnu.org Git - gcc.git/blame - gcc/testsuite/g++.dg/other/cv_func.C
re PR c++/40750 (Side-effect of member function call not produced in certain circumst...
[gcc.git] / gcc / testsuite / g++.dg / other / cv_func.C
CommitLineData
84bafc8d
DG
1// { dg-do compile }
2// { dg-options "-pedantic -pedantic-errors" }
3typedef int FIC(int) const;
4typedef int FI(int);
5
6FIC f; // { dg-error "qualified" }
84bafc8d
DG
7struct S {
8 FIC f; // OK
9
10 const FI g; // { dg-error "qualifier" }
11
12 int h(int) const;
13
14};
15FIC S::*pm = &S::f;
16const FI S::*pm2 = &S::f; // { dg-error "qualifier" }
e4672ccd 17// { dg-error "cannot convert" "cannot convert" { target *-*-* } 16 }
84bafc8d
DG
18const FIC S::*pm3 = &S::f; // { dg-error "qualifier" }
19
20int S::f(int) const
21{
22 return 17;
23}
24
25
26int foo(float) const // { dg-error "qualifier" }
27{
28 return 0;
29}
30
31int bar(float) volatile; // { dg-error "qualifier" }
This page took 1.881514 seconds and 5 git commands to generate.