repo.or.cz
/
netbsd-mini2440.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
No empty .Rs/.Re
[netbsd-mini2440.git]
/
gnu
/
dist
/
gcc4
/
gcc
/
testsuite
/
g++.dg
/
expr
/
static_cast5.C
blob
1a51f15167728afa07063d813a7124659b0513ab
1
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<B*> (&d);
10
D* db = static_cast<D*> (ap); // { dg-error "" }
11
12
D& dr1 = static_cast<D&> (*ap); // { dg-error "" }
13
14
A& ar = static_cast<C&> (d);
15
D& dr = static_cast<D&> (ar); // { dg-error "" }
16
}
17