2 //#pragma implementation
5 // We don't use header files, since we only want to see, whether the
6 // compiler is installed properly.
9 typedef __SIZE_TYPE__
size_t;
11 typedef unsigned int size_t;
15 char *strncpy (char* dest
, const char* dest
, size_t len
);
16 int printf (const char*, ...);
19 #include "cdtest-foo.h"
25 printf ("BROKENLY calling Foo::init_foo from __init_start; size_of(Foo) = %d\n", sizeof(Foo
));
26 foos
= FOOLISH_NUMBER
;
33 strncpy (message
, "default-foo", len
);
35 printf ("Constructing Foo(%d) \"default-foo\" at %08x\n", i
, this);
37 printf ("Constructing Foo(%d) \"default-foo\"\n", i
);
44 strncpy( message
, msg
, len
);
46 printf ( "Constructing Foo(%d) \"%s\" at %08x\n", i
, message
, this);
48 printf ( "Constructing Foo(%d) \"%s\"\n", i
, message
);
53 Foo::Foo (const Foo
& foo
)
57 printf ("Initializing Foo(%d) \"%s\" at %08x with Foo(%d) %08x\n",
58 i
, foo
.message
, this, foo
.i
, &foo
);
60 printf ("Initializing Foo(%d) \"%s\" with Foo(%d)\n",i
, foo
.message
, foo
.i
);
62 for ( int k
= 0; k
< FOO_MSG_LEN
; k
++) message
[k
] = foo
.message
[k
];
66 Foo
& Foo::operator= (const Foo
& foo
)
69 printf ("Copying Foo(%d) \"%s\" at %08x to Foo(%d) %08x\n",
70 foo
.i
, foo
.message
, &foo
, i
, this);
72 printf ("Copying Foo(%d) \"%s\" to Foo(%d)\n", foo
.i
, foo
.message
, i
);
74 for ( int k
= 0; k
< FOO_MSG_LEN
; k
++) message
[k
] = foo
.message
[k
];
83 printf ("Destructing Foo(%d) \"%s\" at %08x (remaining foos: %d)\n",
84 i
, message
, this, foos
);
86 printf ("Destructing Foo(%d) \"%s\" (remaining foos: %d)\n",
This page took 0.03137 seconds and 4 git commands to generate.