repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
FSF GCC merge 02/23/03
[official-gcc.git]
/
gcc
/
testsuite
/
g++.old-deja
/
g++.jason
/
dcast2.C
blob
e42c71da2f5499b1c207963d4c51dc668603a152
1
struct A { virtual void f() { } };
2
struct B { virtual void g() { } };
3
struct C : public A, public B { };
4
5
int main ()
6
{
7
C* cp = 0;
8
B* bp = 0;
9
10
if (dynamic_cast <B*> (cp) != 0)
11
return 1;
12
13
if (dynamic_cast <void *> (bp) != 0)
14
return 1;
15
16
if (dynamic_cast <C*> (bp) != 0)
17
return 1;
18
}