Debian Codegraph @

gcc/testsuite/g++.old-deja/g++.law/ctors20.C

raw
1 // { dg-do assemble }
2 // GROUPS passed constructors
3 // ctor file
4 // Message-Id: <[email protected]>
5 // From: Vivek Khera <[email protected]>
6 // Subject: g++ 2.5.0 fails to automatically generate default initializer
7 // Date: Mon, 01 Nov 1993 12:58:34 -0500
8
9 class String
10 {
11 private:
12 char a[100];
13 int len;
14 public:
15 String();
16 };
17
18 String::String()
19 {
20 len = 0;
21 }
22
23
24 struct List
25 {
26 String item[100];
27 int num_items;
28 // List(); // uncomment this line to let compile work
29 };
30
31 int
32 main(int argc, char **argv)
33 {
34 List a;
35 }