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] - Rev 774

Go to most recent revision | 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 "" } 

Go to most recent revision | Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

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