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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.old-deja/] [g++.bob/] [inherit1.C] - Blame information for rev 699

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 699 jeremybenn
// { dg-do assemble  }
2
class A {
3
char str[10];
4
public:
5
    char* m1 () { return str;}
6
};
7
 
8
class C : public A {
9
public:
10
};
11
 
12
class B : public A {
13
public:
14
    char* m1 () { C::m1(); return ""; } // { dg-error "cannot call" }
15
    // { dg-warning "deprecated" "depr" { target *-*-* } 14 }
16
};
17
 
18
int main () {
19
A a;
20
B b;
21
C c;
22
 
23
a.m1();
24
c.m1();
25
b.m1();
26
}

powered by: WebSVN 2.1.0

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