// { dg-do assemble }
|
// { dg-do assemble }
|
// GROUPS passed assignment
|
// GROUPS passed assignment
|
class ccUnwind
|
class ccUnwind
|
{
|
{
|
public:
|
public:
|
virtual ~ccUnwind (); // comment out virtual, and void diag changes
|
virtual ~ccUnwind (); // comment out virtual, and void diag changes
|
};
|
};
|
|
|
template
|
template
|
class ccHandle : public ccUnwind // similarly comment out inheritance
|
class ccHandle : public ccUnwind // similarly comment out inheritance
|
{
|
{
|
public:
|
public:
|
ccHandle& operator = (const ccHandle& h);
|
ccHandle& operator = (const ccHandle& h);
|
};
|
};
|
|
|
class cc_Image;
|
class cc_Image;
|
|
|
class ccImage : public ccHandle
|
class ccImage : public ccHandle
|
{
|
{
|
public:
|
public:
|
// reversing the order of the next two lines changes the diagnostic
|
// reversing the order of the next two lines changes the diagnostic
|
// printed about the def of ccDisplay::image
|
// printed about the def of ccDisplay::image
|
ccImage (const ccImage &);
|
ccImage (const ccImage &);
|
ccImage (const cc_Image &);
|
ccImage (const cc_Image &);
|
};
|
};
|
|
|
class ccDisplay
|
class ccDisplay
|
{
|
{
|
public:
|
public:
|
ccImage img;
|
ccImage img;
|
//ccImage image ( ccImage i) {img = i; return img;}
|
//ccImage image ( ccImage i) {img = i; return img;}
|
// above line compiles
|
// above line compiles
|
ccImage image ( ccImage i) { return img = i;} /* this gets void* error */
|
ccImage image ( ccImage i) { return img = i;} /* this gets void* error */
|
};
|
};
|
|
|
|
|
|
|
// vd.C: In method `class ccImage ccDisplay::image (class ccImage)':
|
// vd.C: In method `class ccImage ccDisplay::image (class ccImage)':
|
// vd.C:31: bad argument 1 for function `ccImage::ccImage (const class cc_Image&)' (type was void *)
|
// vd.C:31: bad argument 1 for function `ccImage::ccImage (const class cc_Image&)' (type was void *)
|
// vd.C:31: in base initialization for class `ccImage'
|
// vd.C:31: in base initialization for class `ccImage'
|
|
|