FSF GCC merge 02/23/03
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.ext / pretty.C
blob715837de0be0c1295ee1ec6fdb332e37b31fd6f0
1 // Test for PRETTY_FUNCTION
2 // Build don't link:
4 class SV;
6 class SVTable // : public Debug
8   // It is an array to pointer to a SV.
9   SV ** array;
11   // This is the size of array.
12   int maxCount; 
14   // This is the current element count.
15   int count;
17   void fatal_error (const char *f, ...);
19 public:
20   SVTable (int size, const char *d);
21   SVTable ();
22   SVTable (const SVTable &);
23   ~SVTable () {}
28 SVTable::SVTable (int size, const char *d)
29         : maxCount (size), count (0)// , Debug (d)
31   if (size < 0)
32   {
33     fatal_error ("%s: Invalid size: %d\n", __PRETTY_FUNCTION__, size);
34   }
36   array = (SV **) new SV * [size];
38   if (array == 0)
39   {
40     fatal_error ("%s: Failed to allocate array\n", __PRETTY_FUNCTION__);
41   }