Debian Codegraph @

gcc/testsuite/g++.old-deja/g++.bugs/900210_09.C

raw
1 // { dg-do assemble }
2 // g++ 1.36.1 bug 900210_09
3
4 // g++ allows pointer to members (both data members and function members)
5 // to be implicitly converted to void*.
6
7 // Section 4.8 of the Cfront 2.0 Reference Manual disallows such implicit
8 // conversions.
9
10 // Cfront 2.0 passes this test.
11
12 // keywords: member pointers, void pointers, implicit type conversions
13
14 class class0 {
15 public:
16 int class0_data_member_0;
17 void class0_function_member_0 ();
18 };
19
20 int class0::*class0_data_member_pointer;
21 int (class0::*class0_function_member_pointer) ();
22
23 void *vp;
24
25 void global_function_0 ()
26 {
27 vp = class0_data_member_pointer; // { dg-error "" }
28 vp = class0_function_member_pointer; // { dg-error "" }
29 }
30
31 int main () { return 0; }
32
33