summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.bob/inherit1.C
blob: e75190ba130d70b029b9548208cfa7504659213e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// { dg-do assemble  }
class A {
char str[10];
public:
    char* m1 () { return str;}
};

class C : public A {
public:
};

class B : public A {
public:
    char* m1 () { C::m1(); return ""; } // { dg-error "cannot call" } 
    // { dg-warning "deprecated" "depr" { target *-*-* } 14 }
};

int main () {
A a;
B b;
C c;

a.m1();
c.m1();
b.m1();
}