blob: 3fa8e418e87917f5bc997666935b63fc17ce63c7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
// Copyright (C) 2002 Free Software Foundation
// Contributed by Gabriel Dos Reis <gdr@integrable-solutions.net>
struct A {
virtual void f(const A* a) = 0;
};
struct B : virtual A {
virtual void f(const A* a);
};
void B::f(const A* a)
{
static_cast<const B&>(*a); // { dg-error "" }
}
|