Debian Codegraph @

gcc/testsuite/g++.old-deja/g++.law/visibility15.C

raw
1 // { dg-do assemble }
2 // GROUPS passed visibility
3 // visibility file
4 // From: [email protected] (John D. Johnson)
5 // Date: Wed, 4 Aug 93 13:25:25 MDT
6 // Subject: Access to private 'operator new()'
7 // Message-ID: <[email protected]
8 #include <stdio.h>
9 #include <sys/types.h>
10
11 class X {
12 private:
13 void* operator new(size_t) throw(){// { dg-message "" } .*
14 printf("Inside private new().\n");
15 return NULL;
16 }
17 public:
18 X() {}
19 };
20
21
22 int main(void)
23 {
24 X* p = new X;// { dg-error "" } .*
25 }