OSDN Git Service

gcc:
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.dg / warn / pmf1.C
1 // { dg-do compile }
2
3 // Origin: benko@sztaki.hu
4
5 // PR c++/10496: Incorrect pointer to member function diagnostics
6 // for constant member functions.
7
8 struct a
9 {
10   int f() const;
11 };
12
13
14 int
15 a::f() const
16 {
17   int (a::* b)() const = &f; // { dg-error "&a::f" }
18 }