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
/
const4.C
blob
b8b8efa0ae608f6a33893874dd61f74487081355
1
// PRMS Id: 8927
2
// Bug: complex inheritance interferes with const checking
3
4
class GrandParent {
5
public:
6
virtual void DoIt();
7
protected:
8
int A;
9
};
10
11
class Parent : virtual public GrandParent {
12
public:
13
virtual void DoX() const;
14
};
15
16
class Child : public Parent {
17
public:
18
void DoX() const;
19
};
20
21
void Child::DoX() const
22
{
23
A = 10; // ERROR - assignment to const
24
}