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
/
scoping4.C
blob
94a49bfc77a8c3752fd6fd8c1651d0dc4919c3fd
1
// PRMS Id: 4375
2
// Bug: g++ fails to keep track of nested typedefs properly.
3
// Build don't link:
4
5
class A {
6
public:
7
typedef char * Ptr;
8
Ptr s;
9
Ptr get_string();
10
A(Ptr string); // { s = string; };
11
};
12
13
class B {
14
public:
15
typedef A * Ptr;
16
Ptr a;
17
Ptr get_A();
18
B(Ptr a_ptr);
19
};
20
21
A::A(Ptr string) { // gets bogus error -
22
s = string; // gets bogus error -
23
}
24
25
int main() {
26
A a("testing");
27
A *a_ptr;
28
B b(&a);
29
a_ptr = b.get_A();
30
}