projects
/
binutils-gdb.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
* coffread.c: Replace all occurrences of bfd_read with bfd_bread.
[binutils-gdb.git]
/
gdb
/
testsuite
/
gdb.c++
/
namespace.cc
1
namespace
AAA
{
2
char
c
;
3
int
i
;
4
int
A_xyzq
(
int
);
5
char
xyzq
(
char
);
6
class
inA
{
7
public
:
8
int
xx
;
9
int
fum
(
int
);
10
};
11
};
12
13
int
AAA
::
inA
::
fum
(
int
i
)
14
{
15
return
10
+
i
;
16
}
17
18
namespace
BBB
{
19
char
c
;
20
int
i
;
21
int
B_xyzq
(
int
);
22
char
xyzq
(
char
);
23
24
namespace
CCC
{
25
char
xyzq
(
char
);
26
};
27
28
class
Class
{
29
public
:
30
char
xyzq
(
char
);
31
int
dummy
;
32
};
33
};
34
35
int
AAA
::
A_xyzq
(
int
x
)
36
{
37
return
2
*
x
;
38
}
39
40
char
AAA
::
xyzq
(
char
c
)
41
{
42
return
'a'
;
43
}
44
45
46
int
BBB
::
B_xyzq
(
int
x
)
47
{
48
return
3
*
x
;
49
}
50
51
char
BBB
::
xyzq
(
char
c
)
52
{
53
return
'b'
;
54
}
55
56
char
BBB
::
CCC
::
xyzq
(
char
c
)
57
{
58
return
'z'
;
59
}
60
61
char
BBB
::
Class
::
xyzq
(
char
c
)
62
{
63
return
'o'
;
64
}
65
66
void
marker1
(
void
)
67
{
68
return
;
69
}
70
71
72
int
main
()
73
{
74
using
AAA
::
inA
;
75
char
c1
;
76
77
using namespace
BBB
;
78
79
c1
=
xyzq
(
'x'
);
80
c1
=
AAA
::
xyzq
(
'x'
);
81
c1
=
BBB
::
CCC
::
xyzq
(
'm'
);
82
83
inA ina
;
84
85
ina
.
xx
=
33
;
86
87
int
y
;
88
89
y
=
AAA
::
A_xyzq
(
33
);
90
y
+=
B_xyzq
(
44
);
91
92
BBB
::
Class cl
;
93
94
c1
=
cl
.
xyzq
(
'e'
);
95
96
marker1
();
97
98
}
99
100
101
102
103