summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/lookup/new2.C
blob: d468182c18b7307f40b9db80324014e25b8ebe31 (plain)
1
2
3
4
5
6
7
8
9
10
11
// { dg-do compile }
// Reject [de-]allocation functions declared in a namespace, or
//   declared as static.

namespace A {
  void* operator new(__SIZE_TYPE__ s, int* p); // { dg-error "namespace" }
  void  operator delete(void*);                // { dg-error "namespace" }
}

static void* operator new(__SIZE_TYPE__ s, int* p); // { dg-error "static" }
static void  operator delete(void*);                // { dg-error "static" }