OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [overload/] [new1.C] - Blame information for rev 693

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 693 jeremybenn
typedef __SIZE_TYPE__ size_t;
2
void *operator new(size_t, unsigned int);
3
 
4
struct X{
5
  X();
6
  X(int);
7
};
8
 
9
 
10
void f(X *x = new X);          // { dg-error "" }
11
 
12
void f(X *x = new X(4));       // { dg-error "" }
13
 
14
void f(X *x = new X[4]);       // { dg-error "" }
15
 
16
void f(X *x = new (3) X(6));   // { dg-error "" }
17
 
18
void f(X *x = new (2) X[10]);  // { dg-error "" }
19
// { dg-message "candidate" "candidate note" { target *-*-* } 18 }
20
// { dg-message "operator new|candidate expects" "match candidate text" { target *-*-* } 00 }
21
 
22
void f(X *x = new X[10][5]);   // { dg-error "" }

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.