summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.law/visibility15.C
blob: 434d7da923994aceae785f1ed8f4375ac98eca6e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// { dg-do assemble  }
// GROUPS passed visibility
// visibility file
// From: wpsun4!xinforms!johnjo@uunet.uu.net (John D. Johnson)
// Date:     Wed, 4 Aug 93 13:25:25 MDT
// Subject:  Access to private 'operator new()'
// Message-ID: <9308041925.AA09825@xinforms.wpunix
#include <stdio.h>
#include <sys/types.h>

class X {
private:
  void* operator new(size_t) throw(){// { dg-error "" } .*
    printf("Inside private new().\n");
    return NULL;
  }
public:
  X() {}
};


int main(void)
{
  X* p = new X;// { dg-error "" } .*
}