Work around MinGW mangling of "host:/path"
[msysgit/historical-msysgit.git] / mingw / info / stabs / Nested-Procedures.html
blobe73f2f07dfce44672b943ec30eaf12b9b6868460
1 <html lang="en">
2 <head>
3 <title>STABS</title>
4 <meta http-equiv="Content-Type" content="text/html">
5 <meta name="description" content="STABS">
6 <meta name="generator" content="makeinfo 4.3">
7 <link href="http://www.gnu.org/software/texinfo/" rel="generator-home">
8 </head>
9 <body>
10 <div class="node">
11 <p>
12 Node:<a name="Nested%20Procedures">Nested Procedures</a>,
13 Next:<a rel="next" accesskey="n" href="Block-Structure.html#Block%20Structure">Block Structure</a>,
14 Previous:<a rel="previous" accesskey="p" href="Procedures.html#Procedures">Procedures</a>,
15 Up:<a rel="up" accesskey="u" href="Program-Structure.html#Program%20Structure">Program Structure</a>
16 <hr><br>
17 </div>
19 <h3 class="section">Nested Procedures</h3>
21 <p>For any of the symbol descriptors representing procedures, after the
22 symbol descriptor and the type information is optionally a scope
23 specifier. This consists of a comma, the name of the procedure, another
24 comma, and the name of the enclosing procedure. The first name is local
25 to the scope specified, and seems to be redundant with the name of the
26 symbol (before the <code>:</code>). This feature is used by GCC, and
27 presumably Pascal, Modula-2, etc., compilers, for nested functions.
29 <p>If procedures are nested more than one level deep, only the immediately
30 containing scope is specified. For example, this code:
32 <pre class="example"> int
33 foo (int x)
35 int bar (int y)
37 int baz (int z)
39 return x + y + z;
41 return baz (x + 2 * y);
43 return x + bar (3 * x);
45 </pre>
47 <p>produces the stabs:
49 <pre class="example"> .stabs "baz:f1,baz,bar",36,0,0,_baz.15 # 36 is N_FUN
50 .stabs "bar:f1,bar,foo",36,0,0,_bar.12
51 .stabs "foo:F1",36,0,0,_foo
52 </pre>
54 </body></html>