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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gdb-7.1/] [gdb/] [testsuite/] [gdb.cp/] [nsusing.cc] - Blame information for rev 227

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 227 jeremybenn
namespace M
2
{
3
  int x = 911;
4
}
5
 
6
namespace N
7
{
8
  int x = 912;
9
}
10
 
11
int marker10 ()
12
{
13
  using namespace M;
14
  int y = x + 1; // marker10 stop
15
  using namespace N;
16
  return y;
17
}
18
 
19
namespace J
20
{
21
  int jx = 44;
22
}
23
 
24
namespace K
25
{
26
  int marker9 ()
27
  {
28
    //x;
29
    return marker10 ();
30
  }
31
}
32
 
33
namespace L
34
{
35
  using namespace J;
36
  int marker8 ()
37
  {
38
    jx;
39
    return K::marker9 ();
40
  }
41
}
42
 
43
namespace G
44
{
45
  namespace H
46
  {
47
    int ghx = 6;
48
  }
49
}
50
 
51
namespace I
52
{
53
  int marker7 ()
54
  {
55
    using namespace G::H;
56
    ghx;
57
    return L::marker8 ();
58
  }
59
}
60
 
61
namespace E
62
{
63
  namespace F
64
  {
65
    int efx = 5;
66
  }
67
}
68
 
69
using namespace E::F;
70
int marker6 ()
71
{
72
  efx;
73
  return I::marker7 ();
74
}
75
 
76
namespace A
77
{
78
  int _a = 1;
79
  int x = 2;
80
}
81
 
82
namespace C
83
{
84
  int cc = 3;
85
}
86
 
87
namespace D
88
{
89
  int dx = 4;
90
}
91
 
92
using namespace C;
93
int marker5 ()
94
{
95
  cc;
96
  return marker6 ();
97
}
98
 
99
int marker4 ()
100
{
101
  using D::dx;
102
  return marker5 ();
103
}
104
 
105
int marker3 ()
106
{
107
  return marker4 ();
108
}
109
 
110
int marker2 ()
111
{
112
  namespace B = A;
113
  B::_a;
114
  return marker3 ();
115
}
116
 
117
int marker1 ()
118
{
119
  int total = 0;
120
    {
121
      int b = 1;
122
        {
123
          using namespace A;
124
          int c = 2;
125
            {
126
              int d = 3;
127
              total = _a + b + c + d + marker2 (); // marker1 stop
128
            }
129
        }
130
    }
131
  return marker2 () + total;
132
}
133
 
134
int main ()
135
{
136
  using namespace A;
137
  _a;
138
  return marker1 ();
139
}

powered by: WebSVN 2.1.0

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