| 1 |
// { dg-do assemble } |
| 2 |
// From: [email protected] (Peter Smidt) |
| 3 |
// Date: 25 Jan 1994 23:41:33 -0500 |
| 4 |
// Bug: g++ forgets access decls after the definition. |
| 5 |
|
| 6 |
class inh { |
| 7 |
int a; |
| 8 |
protected: |
| 9 |
void myf(int); |
| 10 |
}; |
| 11 |
|
| 12 |
class mel : private inh // { dg-message "" } inaccessible |
| 13 |
{ |
| 14 |
protected: |
| 15 |
int t; |
| 16 |
inh::myf; // { dg-warning "deprecated" } |
| 17 |
}; |
| 18 |
|
| 19 |
class top_t : protected mel { |
| 20 |
public: |
| 21 |
void myf(int); |
| 22 |
}; |
| 23 |
|
| 24 |
void inh::myf(int i) { |
| 25 |
a = i; |
| 26 |
} |
| 27 |
|
| 28 |
void top_t::myf(int i) { |
| 29 |
inh::myf(i); // { dg-error "" } cannot convert to inh |
| 30 |
mel::myf(i); |
| 31 |
} |