URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Subversion Repositories openrisc
[/] [openrisc/] [tags/] [gnu-dev/] [fsf-gcc-snapshot-1-mar-12/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [overload/] [new1.C] - Rev 783
Compare with Previous | Blame | View Log
typedef __SIZE_TYPE__ size_t;
void *operator new(size_t, unsigned int);
struct X{
X();
X(int);
};
void f(X *x = new X); // { dg-error "" }
void f(X *x = new X(4)); // { dg-error "" }
void f(X *x = new X[4]); // { dg-error "" }
void f(X *x = new (3) X(6)); // { dg-error "" }
void f(X *x = new (2) X[10]); // { dg-error "" }
// { dg-message "candidate" "candidate note" { target *-*-* } 18 }
// { dg-message "operator new|candidate expects" "match candidate text" { target *-*-* } 00 }
void f(X *x = new X[10][5]); // { dg-error "" }