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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [init/] [pr29043.C] - Blame information for rev 718

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

Line No. Rev Author Line
1 693 jeremybenn
// PR c++/29043
2
// { dg-do compile }
3
 
4
struct S
5
{
6
  int const i; // { dg-message "should be initialized" }
7
};
8
 
9
class C
10
{
11
public:
12
  C() {} // { dg-error "uninitialized const member" }
13
  S s;
14
};
15
 
16
struct S2
17
{
18
  int& ref; // { dg-message "should be initialized" }
19
};
20
 
21
class C2
22
{
23
public:
24
  C2() {} // { dg-error "uninitialized reference member" }
25
  S2 s;
26
};
27
 
28
class C3
29
{
30
  C3() { }
31
  struct s {
32
    const int i;
33
  };
34
};
35
 
36
struct S4
37
{
38
  int const i; // { dg-message "should be initialized" }
39
};
40
 
41
struct C4
42
{
43
  C4() {} // { dg-error "uninitialized const member" }
44
  S4 s4[ 1 ];
45
};
46
 
47
struct C5
48
{
49
  C5() {} // { dg-message "uninitialized" }
50
  int const iit[ 1 ];
51
};
52
 

powered by: WebSVN 2.1.0

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