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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [cpp0x/] [constexpr-ref2.C] - Rev 774

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

// Negative reference variable tests.
// { dg-options -std=c++0x }

extern int *p;
constexpr int& ri = *p;         // { dg-error "p" }

extern constexpr int &er;       // { dg-error "not a definition" }
constexpr int& ri2 = er;        // { dg-error "er" }

void f(int j)
{
  constexpr int i = 42;
  constexpr int const& ri = i;  // { dg-error "" }

  constexpr int& rj = j;        // { 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.