OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [warn/] [pr5645.C] - Blame information for rev 801

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 693 jeremybenn
// PR5645: gcc warns that pure virtual class not explicitly initialized.
2
// { dg-do compile }
3
// { dg-options "-Wall -Wextra" }
4
 
5
class a {
6
public:
7
  virtual int f() = 0;
8
  virtual int g() = 0;
9
};
10
 
11
class b : public a {
12
public:
13
  b();
14
  b(const b& c);
15
 
16
protected:
17
  int i;
18
};
19
 
20
b::b() {}
21
 
22
b::b(const b& c) { // { dg-bogus "base class .class a. should be explicitly initialized in the copy constructor" }
23
  i = c.i;
24
}
25
 
26
struct X {};
27
 
28
struct Y : X
29
{
30
  Y (Y const&) {}
31
};
32
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.