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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [cpp0x/] [initlist21.C] - Rev 701

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

// PR c++/40689
// { dg-options "-std=c++0x" }

class X
{
 public:
  X(): data {1,2} {} // { dg-error "too many initializers" }
 private:
  const short data[1];
};

int f(int n)
{
  const float * pData = new const float[1] { 1.5, 2.5 }; // { dg-error "too many initializers" }
  pData = new const float[n] { 1.5, 2.5 }; // { dg-warning "array size" }

  return 0;
}

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.