2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.bugs / 900210_09.C
blobaabe3d5cc92accbf3bdb81a2d7e034ad34cf21a4
1 // { dg-do assemble  }
2 // g++ 1.36.1 bug 900210_09
4 // g++ allows pointer to members (both data members and function members)
5 // to be implicitly converted to void*.
7 // Section 4.8 of the Cfront 2.0 Reference Manual disallows such implicit
8 // conversions.
10 // Cfront 2.0 passes this test.
12 // keywords: member pointers, void pointers, implicit type conversions
14 class class0 {
15 public:
16   int class0_data_member_0;
17   void class0_function_member_0 ();
20 int class0::*class0_data_member_pointer;
21 int (class0::*class0_function_member_pointer) ();
23 void *vp;
25 void global_function_0 ()
27   vp = class0_data_member_pointer;              // { dg-error "" } 
28   vp = class0_function_member_pointer;          // { dg-error "" } 
31 int main () { return 0; }