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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.old-deja/] [g++.other/] [cast2.C] - Blame information for rev 699

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 699 jeremybenn
// { dg-do assemble  }
2
// Origin: Mark Mitchell 
3
 
4
struct A {
5
};
6
 
7
int main()
8
{
9
  A a;
10
  typedef void (A::*F)();
11
  F p;
12
 
13
  const_cast(a); // { dg-error "" } const_cast requires pointer/ref types
14
  const_cast(p); // { dg-error "" } const_cast requires pointer/ref types
15
  const_cast(&main); // { dg-error "" } function type in const_cast
16
  const_cast(main); // { dg-error "" } function type in const_cast
17
}

powered by: WebSVN 2.1.0

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