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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [cpp0x/] [constexpr-pedantic.C] - Blame information for rev 774

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

Line No. Rev Author Line
1 693 jeremybenn
// The FCD doesn't allow typedefs and static_assert in constexpr functions,
2
// but it should.
3
// { dg-options "-std=c++0x -pedantic" }
4
 
5
template 
6
constexpr T f(T t)
7
{
8
  typedef T T2;                      // { dg-warning "constexpr" "" { xfail *-*-* } }
9
  static_assert (T2(0) == T(0), ""); // { dg-warning "constexpr" "" { xfail *-*-* } }
10
  return t;
11
}
12
 
13
int main()
14
{
15
  constexpr int i = f(42);
16
}

powered by: WebSVN 2.1.0

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