blob: 614d3c5ad88405837acd82923c6c5d44974aaa17 [file] [log] [blame]
// { dg-do compile }
// Origin: <igodard at rational dot com>
// PR c++/2518: operator new must not be looked up in local scope
int main() {
int i;
void* operator new(unsigned long s, int* p);
int* e = new(&i) int; // { dg-error "no matching function" }
int* f = new int;
return 0;
}