Debian Codegraph @

gcc/testsuite/g++.old-deja/g++.ext/pretty.C

raw
1 // { dg-do assemble }
2 // Test for PRETTY_FUNCTION
3
4 class SV;
5
6 class SVTable // : public Debug
7 {
8 // It is an array to pointer to a SV.
9 SV ** array;
10
11 // This is the size of array.
12 int maxCount;
13
14 // This is the current element count.
15 int count;
16
17 void fatal_error (const char *f, ...);
18
19 public:
20 SVTable (int size, const char *d);
21 SVTable ();
22 SVTable (const SVTable &);
23 ~SVTable () {}
24
25 };
26
27
28 SVTable::SVTable (int size, const char *d)
29 : maxCount (size), count (0)// , Debug (d)
30 {
31 if (size < 0)
32 {
33 fatal_error ("%s: Invalid size: %d\n", __PRETTY_FUNCTION__, size);
34 }
35
36 array = (SV **) new SV * [size];
37
38 if (array == 0)
39 {
40 fatal_error ("%s: Failed to allocate array\n", __PRETTY_FUNCTION__);
41 }
42 }