OSDN Git Service

Initial revision
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.old-deja / g++.ext / pretty.C
1 // Test for PRETTY_FUNCTION
2 // Build don't link:
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 (__PRETTY_FUNCTION__ ": Invalid size: %d\n", size);
34   }
35
36   array = (SV **) new SV * [size];
37
38   if (array == 0)
39   {
40     fatal_error (__PRETTY_FUNCTION__
41         ": Failed to allocate array\n");
42   }
43 }