2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.law / visibility15.C
blob434d7da923994aceae785f1ed8f4375ac98eca6e
1 // { dg-do assemble  }
2 // GROUPS passed visibility
3 // visibility file
4 // From: wpsun4!xinforms!johnjo@uunet.uu.net (John D. Johnson)
5 // Date:     Wed, 4 Aug 93 13:25:25 MDT
6 // Subject:  Access to private 'operator new()'
7 // Message-ID: <9308041925.AA09825@xinforms.wpunix
8 #include <stdio.h>
9 #include <sys/types.h>
11 class X {
12 private:
13   void* operator new(size_t) throw(){// { dg-error "" } .*
14     printf("Inside private new().\n");
15     return NULL;
16   }
17 public:
18   X() {}
22 int main(void)
24   X* p = new X;// { dg-error "" } .*