URL
https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk
Subversion Repositories openrisc_2011-10-31
[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [g++.dg/] [warn/] [pr5645.C] - Rev 325
Go to most recent revision | Compare with Previous | Blame | View Log
// PR5645: gcc warns that pure virtual class not explicitly initialized.
// { dg-do compile }
// { dg-options "-Wall -Wextra" }
class a {
public:
virtual int f() = 0;
virtual int g() = 0;
};
class b : public a {
public:
b();
b(const b& c);
protected:
int i;
};
b::b() {}
b::b(const b& c) { // { dg-bogus "base class .class a. should be explicitly initialized in the copy constructor" }
i = c.i;
}
struct X {};
struct Y : X
{
Y (Y const&) {}
};
Go to most recent revision | Compare with Previous | Blame | View Log