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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.2.2/] [gcc/] [testsuite/] [g++.old-deja/] [g++.bugs/] [900205_04.C] - Blame information for rev 154

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
// { dg-do assemble  }
2
// g++ 1.36.1 bug 900205_04
3
 
4
// g++ allows a class for which an implicit default X::X() constructor must
5
// be created (implicitly by the compiler) to be derived from another class
6
// which does not have its own default X::X() constructor.  This is illegal.
7
 
8
// Cfront 2.0 passes this test.
9
 
10
// keywords: default constructor, inheritance
11
 
12
// In ISO C++ 1998, such a derived class is not ill-formed, but if the
13
// implicitly-declared constructor is used, then it is implicitly
14
// defined and found to be ill-formed.
15
 
16
struct struct0 { // { dg-error "note" }
17
  int data_member;
18
 
19
  struct0 (int, void *);        // suppresses implicit default constructor
20
};
21
 
22
struct0::struct0 (int, void *) // { dg-error "note" }
23
{
24
}
25
 
26
struct struct0_derived_struct_0 : public struct0 { // { dg-error "no matching" }
27
};
28
 
29
struct0_derived_struct_0 object; // { dg-error "synthesized" }
30
 
31
int main () { return 0; }

powered by: WebSVN 2.1.0

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