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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [g++.dg/] [expr/] [static_cast5.C] - Blame information for rev 816

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
void ambig()
2
{
3
  struct A {};
4
  struct B : A {};
5
  struct C : A {};
6
  struct D : B, C {};
7
 
8
  D d;
9
  A* ap = static_cast (&d);
10
  D* db = static_cast (ap); // { dg-error "" }
11
 
12
  D& dr1 = static_cast (*ap); // { dg-error "" }
13
 
14
  A& ar = static_cast (d);
15
  D& dr = static_cast (ar);  // { dg-error "" }
16
}
17
 

powered by: WebSVN 2.1.0

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