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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [cpp0x/] [pr51150.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
// PR c++/51150
2
// { dg-options "-std=c++0x" }
3
 
4
struct Clock {
5
  double Now();
6
};
7
template  void Foo(Clock* clock) {
8
  const int now = clock->Now();
9
}
10
 
11
template void Foo(Clock*);
12
 
13
template  void Boo(int val) {
14
  const int now1 = (double)(val);
15
  const int now2 = const_cast(val); // { dg-error "invalid" }
16
  const int now3 = static_cast(val);
17
  const int now4 = reinterpret_cast(val); // { dg-error "invalid" }
18
}
19
 
20
template void Boo(int);

powered by: WebSVN 2.1.0

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