annotate gcc/testsuite/g++.dg/conversion/ptrmem9.C @ 145:1830386684a0

gcc-9.2.0
author anatofuz
date Thu, 13 Feb 2020 11:34:05 +0900
parents 04ced10e8804
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 // Copyright (C) 2007 Free Software Foundation
kono
parents:
diff changeset
2 // Contributed by Ollie Wild <aaw@google.com>
kono
parents:
diff changeset
3 // { dg-do compile }
kono
parents:
diff changeset
4
kono
parents:
diff changeset
5 // Test implicit conversion of pointers to member functions appearing as
kono
parents:
diff changeset
6 // operands of the equality operators.
kono
parents:
diff changeset
7
kono
parents:
diff changeset
8 struct B { };
kono
parents:
diff changeset
9
kono
parents:
diff changeset
10 struct BV { };
kono
parents:
diff changeset
11
kono
parents:
diff changeset
12 struct D : B, virtual BV { };
kono
parents:
diff changeset
13
kono
parents:
diff changeset
14 struct C { };
kono
parents:
diff changeset
15
kono
parents:
diff changeset
16 void f ()
kono
parents:
diff changeset
17 {
kono
parents:
diff changeset
18 void (D::*pd) () = 0;
kono
parents:
diff changeset
19 void (B::*pb) () = 0;
kono
parents:
diff changeset
20 void (BV::*pbv) () = 0;
kono
parents:
diff changeset
21 void (C::*pc) () = 0;
kono
parents:
diff changeset
22
kono
parents:
diff changeset
23 pd == pb;
kono
parents:
diff changeset
24 pd == pbv; // { dg-error "" }
145
1830386684a0 gcc-9.2.0
anatofuz
parents: 111
diff changeset
25 pd == pc; // { dg-error "6:comparison between distinct pointer-to-member types" }
111
kono
parents:
diff changeset
26 }