2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.jason / 3523.C
bloba0ddc9ca1542ab1da5b801586fcb04bf375f4c79
1 // { dg-do assemble  }
2 // GROUPS passed assignment
3 class ccUnwind 
5 public:
6     virtual ~ccUnwind (); // comment out virtual, and void diag changes
7 };
9 template<class T>
10 class ccHandle : public ccUnwind // similarly comment out inheritance
11 {   
12 public:
13     ccHandle& operator = (const ccHandle& h);
16 class cc_Image;          
18 class ccImage : public ccHandle<cc_Image>
20 public:
21 //  reversing the order of the next two lines changes the diagnostic
22 //  printed about the def of ccDisplay::image 
23     ccImage    (const  ccImage  &);
24     ccImage    (const  cc_Image &);
27 class ccDisplay 
29 public:
30     ccImage img;
31 //ccImage image ( ccImage i) {img = i; return img;}
32 // above line  compiles 
33     ccImage image ( ccImage i) { return img = i;} /* this gets void* error */
38 // vd.C: In method `class ccImage ccDisplay::image (class ccImage)':
39 // vd.C:31: bad argument 1 for function `ccImage::ccImage (const class cc_Image&)' (type was void *)
40 // vd.C:31: in base initialization for class `ccImage'