This file is indexed.

/usr/share/doc/python-pygccxml-doc/html/upgrade_issues.html is in python-pygccxml-doc 1.8.0-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
  <meta charset="utf-8">
  
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  
  <title>GCC-XML 0.7 → 0.9 upgrade issues (Legacy) &mdash; pygccxml 1.8.0 documentation</title>
  

  
  

  

  
  
    

  

  
  
    <link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
  

  

  
    <link rel="top" title="pygccxml 1.8.0 documentation" href="index.html"/>
        <link rel="prev" title="pygccxml.utils package" href="apidocs/utils.html"/> 

  
  <script src="_static/js/modernizr.min.js"></script>

</head>

<body class="wy-body-for-nav" role="document">

  <div class="wy-grid-for-nav">

    
    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
      <div class="wy-side-scroll">
        <div class="wy-side-nav-search">
          

          
            <a href="index.html" class="icon icon-home"> pygccxml
          

          
          </a>

          
            
            
              <div class="version">
                1.8.0
              </div>
            
          

          
<div role="search">
  <form id="rtd-search-form" class="wy-form" action="search.html" method="get">
    <input type="text" name="q" placeholder="Search docs" />
    <input type="hidden" name="check_keywords" value="yes" />
    <input type="hidden" name="area" value="default" />
  </form>
</div>

          
        </div>

        <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
          
            
            
                <ul class="current">
<li class="toctree-l1"><a class="reference internal" href="install.html">Download &amp; Install</a></li>
<li class="toctree-l1"><a class="reference internal" href="examples.html">Examples</a></li>
<li class="toctree-l1"><a class="reference internal" href="documentation.html">Building the documentation</a></li>
<li class="toctree-l1"><a class="reference internal" href="faq.html">FAQ</a></li>
<li class="toctree-l1"><a class="reference internal" href="query_interface.html">Declarations query API</a></li>
<li class="toctree-l1"><a class="reference internal" href="design.html">Design overview</a></li>
<li class="toctree-l1"><a class="reference internal" href="users.html">Who is using pygccxml?</a></li>
<li class="toctree-l1"><a class="reference internal" href="links.html">C++ Reflection</a></li>
<li class="toctree-l1"><a class="reference internal" href="releasing.html">Releasing</a></li>
<li class="toctree-l1"><a class="reference internal" href="history.html">History and Credits</a></li>
<li class="toctree-l1"><a class="reference internal" href="apidocs/api.html">API</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">GCC-XML 0.7 → 0.9 upgrade issues (Legacy)</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#introduction">Introduction</a></li>
<li class="toctree-l2"><a class="reference internal" href="#default-constructor">Default constructor</a></li>
<li class="toctree-l2"><a class="reference internal" href="#pointer-to-member-variable">Pointer to member variable</a></li>
<li class="toctree-l2"><a class="reference internal" href="#constant-variable-value">Constant variable value</a></li>
<li class="toctree-l2"><a class="reference internal" href="#free-and-member-function-default-arguments">Free and member function default arguments</a></li>
<li class="toctree-l2"><a class="reference internal" href="#name-mangling">Name mangling</a></li>
</ul>
</li>
</ul>

            
          
        </div>
      </div>
    </nav>

    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">

      
      <nav class="wy-nav-top" role="navigation" aria-label="top navigation">
        <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
        <a href="index.html">pygccxml</a>
      </nav>


      
      <div class="wy-nav-content">
        <div class="rst-content">
          

 



<div role="navigation" aria-label="breadcrumbs navigation">
  <ul class="wy-breadcrumbs">
    <li><a href="index.html">Docs</a> &raquo;</li>
      
    <li>GCC-XML 0.7 → 0.9 upgrade issues (Legacy)</li>
      <li class="wy-breadcrumbs-aside">
        
          
            <a href="_sources/upgrade_issues.txt" rel="nofollow"> View page source</a>
          
        
      </li>
  </ul>
  <hr/>
</div>
          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
           <div itemprop="articleBody">
            
  <div class="section" id="gcc-xml-0-7-0-9-upgrade-issues-legacy">
<h1>GCC-XML 0.7 → 0.9 upgrade issues (Legacy)<a class="headerlink" href="#gcc-xml-0-7-0-9-upgrade-issues-legacy" title="Permalink to this headline"></a></h1>
<div class="section" id="introduction">
<h2>Introduction<a class="headerlink" href="#introduction" title="Permalink to this headline"></a></h2>
<p>This page is kept here for historical reasons. CastXML is the recommended
xml generator and GCC-XML is being phased out. This page will be removed
in version 2.0.0 of pygcxml.</p>
<p>Recently, GCC-XML internal parser was updated to GCC 4.2. The internal representation
of source code, provided by GCC&#8217;s parser, has changed a lot and few backward
compatibility issues were introduced. In this document, I will try to cover all
problems you may encounter.</p>
</div>
<div class="section" id="default-constructor">
<h2>Default constructor<a class="headerlink" href="#default-constructor" title="Permalink to this headline"></a></h2>
<p>GCC-XML 0.9 doesn&#8217;t report compiler generated default and copy constructors as
an implicit ones.</p>
<p>If you rely heavily on their existence in the generated XML, I suggest you to switch
to <code class="xref py py-func docutils literal"><span class="pre">has_trivial_constructor</span></code>
and to <code class="xref py py-func docutils literal"><span class="pre">has_trivial_copy</span></code> functions.</p>
</div>
<div class="section" id="pointer-to-member-variable">
<h2>Pointer to member variable<a class="headerlink" href="#pointer-to-member-variable" title="Permalink to this headline"></a></h2>
<p>Previous version of GCC-XML reported pointer to member variable as a &#8220;PointerType&#8221;
with reference to &#8220;OffsetType&#8221;. The new version removes &#8220;PointerType&#8221; from this sequence.</p>
<p>C++ code:</p>
<div class="highlight-c++"><div class="highlight"><pre><span></span><span class="k">struct</span> <span class="n">xyz_t</span><span class="p">{</span>
  <span class="kt">int</span> <span class="n">do_smth</span><span class="p">(</span> <span class="kt">double</span> <span class="p">);</span>
  <span class="kt">int</span> <span class="n">m_some_member</span><span class="p">;</span>
<span class="p">};</span>

<span class="k">typedef</span> <span class="nf">int</span> <span class="p">(</span><span class="n">xyz_t</span><span class="o">::*</span><span class="n">mfun_ptr_t</span><span class="p">)(</span> <span class="kt">double</span> <span class="p">);</span>

<span class="k">typedef</span> <span class="nf">int</span> <span class="p">(</span><span class="n">xyz_t</span><span class="o">::*</span><span class="n">mvar_ptr_t</span><span class="p">);</span>
</pre></div>
</div>
<p>GCC-XML 0.7:</p>
<div class="highlight-xml"><div class="highlight"><pre><span></span><span class="nt">&lt;Typedef</span> <span class="na">id=</span><span class="s">&quot;_6&quot;</span> <span class="na">name=</span><span class="s">&quot;mfun_ptr_t&quot;</span> <span class="na">type=</span><span class="s">&quot;_5&quot;</span> <span class="nt">/&gt;</span>
<span class="nt">&lt;PointerType</span> <span class="na">id=</span><span class="s">&quot;_5&quot;</span> <span class="na">type=</span><span class="s">&quot;_128&quot;</span> <span class="na">size=</span><span class="s">&quot;32&quot;</span> <span class="na">align=</span><span class="s">&quot;32&quot;</span><span class="nt">/&gt;</span>
<span class="nt">&lt;MethodType</span> <span class="na">id=</span><span class="s">&quot;_128&quot;</span> <span class="na">basetype=</span><span class="s">&quot;_7&quot;</span> <span class="na">returns=</span><span class="s">&quot;_136&quot;</span><span class="nt">&gt;</span>
  <span class="nt">&lt;Argument</span> <span class="na">type=</span><span class="s">&quot;_140&quot;</span><span class="nt">/&gt;</span>
<span class="nt">&lt;/MethodType&gt;</span>

<span class="nt">&lt;Typedef</span> <span class="na">id=</span><span class="s">&quot;_4&quot;</span> <span class="na">name=</span><span class="s">&quot;mvar_ptr_t&quot;</span> <span class="na">type=</span><span class="s">&quot;_3&quot;</span> <span class="nt">/&gt;</span>
<span class="nt">&lt;PointerType</span> <span class="na">id=</span><span class="s">&quot;_3&quot;</span> <span class="na">type=</span><span class="s">&quot;_127&quot;</span> <span class="na">size=</span><span class="s">&quot;32&quot;</span> <span class="na">align=</span><span class="s">&quot;32&quot;</span><span class="nt">/&gt;</span>
<span class="nt">&lt;OffsetType</span> <span class="na">id=</span><span class="s">&quot;_127&quot;</span> <span class="na">basetype=</span><span class="s">&quot;_7&quot;</span> <span class="na">type=</span><span class="s">&quot;_136&quot;</span> <span class="na">size=</span><span class="s">&quot;32&quot;</span> <span class="na">align=</span><span class="s">&quot;32&quot;</span><span class="nt">/&gt;</span>
</pre></div>
</div>
<p>GCC-XML 0.9:</p>
<div class="highlight-xml"><div class="highlight"><pre><span></span><span class="nt">&lt;Typedef</span> <span class="na">id=</span><span class="s">&quot;_97&quot;</span> <span class="na">name=</span><span class="s">&quot;mfun_ptr_t&quot;</span> <span class="na">type=</span><span class="s">&quot;_96&quot;</span> <span class="nt">/&gt;</span>
<span class="nt">&lt;PointerType</span> <span class="na">id=</span><span class="s">&quot;_96&quot;</span> <span class="na">type=</span><span class="s">&quot;_147&quot;</span> <span class="na">size=</span><span class="s">&quot;32&quot;</span> <span class="na">align=</span><span class="s">&quot;32&quot;</span><span class="nt">/&gt;</span>
<span class="nt">&lt;MethodType</span> <span class="na">id=</span><span class="s">&quot;_147&quot;</span> <span class="na">basetype=</span><span class="s">&quot;_92&quot;</span> <span class="na">returns=</span><span class="s">&quot;_131&quot;</span><span class="nt">&gt;</span>
  <span class="nt">&lt;Argument</span> <span class="na">type=</span><span class="s">&quot;_127&quot;</span><span class="nt">/&gt;</span>
<span class="nt">&lt;/MethodType&gt;</span>

<span class="nt">&lt;Typedef</span> <span class="na">id=</span><span class="s">&quot;_52&quot;</span> <span class="na">name=</span><span class="s">&quot;mvar_ptr_t&quot;</span> <span class="na">type=</span><span class="s">&quot;_139&quot;</span> <span class="nt">/&gt;</span>
<span class="nt">&lt;OffsetType</span> <span class="na">id=</span><span class="s">&quot;_139&quot;</span> <span class="na">basetype=</span><span class="s">&quot;_92&quot;</span> <span class="na">type=</span><span class="s">&quot;_131&quot;</span> <span class="na">size=</span><span class="s">&quot;32&quot;</span> <span class="na">align=</span><span class="s">&quot;32&quot;</span><span class="nt">/&gt;</span>
</pre></div>
</div>
<p>pygccxml handles this issue automatically, you don&#8217;t have to change your code.</p>
</div>
<div class="section" id="constant-variable-value">
<h2>Constant variable value<a class="headerlink" href="#constant-variable-value" title="Permalink to this headline"></a></h2>
<p>GCC-XML 0.9 uses suffix to report the constant variable value</p>
<p>For example:</p>
<div class="highlight-c++"><div class="highlight"><pre><span></span><span class="k">const</span> <span class="kt">long</span> <span class="kt">unsigned</span> <span class="kt">int</span> <span class="n">initialized</span> <span class="o">=</span> <span class="mi">10122004</span><span class="p">;</span>
</pre></div>
</div>
<p>GCC-XML 0.9 will report the <code class="docutils literal"><span class="pre">initialized</span></code> value as <code class="docutils literal"><span class="pre">10122004ul</span></code>, while GCC-XML
0.7 as <code class="docutils literal"><span class="pre">10122004</span></code>.</p>
<p>pygccxml handles  this problem automatically, you don&#8217;t have to change your code.</p>
</div>
<div class="section" id="free-and-member-function-default-arguments">
<h2>Free and member function default arguments<a class="headerlink" href="#free-and-member-function-default-arguments" title="Permalink to this headline"></a></h2>
<p>Both versions of GCC-XML have a few issues, related to default arguments. GCC-XML 0.9
fixes some issues, but introduces another ones. Take a look on the following examples:</p>
<ul>
<li><p class="first">Example 1</p>
<div class="highlight-c++"><div class="highlight"><pre><span></span><span class="kt">void</span> <span class="nf">fix_numeric</span><span class="p">(</span> <span class="n">ull</span> <span class="n">arg</span><span class="o">=</span><span class="p">(</span><span class="n">ull</span><span class="p">)</span><span class="o">-</span><span class="mi">1</span> <span class="p">);</span>
</pre></div>
</div>
<p>GCC-XML 0.7</p>
<div class="highlight-xml"><div class="highlight"><pre><span></span><span class="nt">&lt;Argument</span> <span class="na">name=</span><span class="s">&quot;arg&quot;</span> <span class="na">type=</span><span class="s">&quot;_7&quot;</span> <span class="na">default=</span><span class="s">&quot;0xffffffffffffffff&quot;</span><span class="nt">/&gt;</span>
</pre></div>
</div>
<p>GCC-XML 0.9</p>
<div class="highlight-xml"><div class="highlight"><pre><span></span><span class="nt">&lt;Argument</span> <span class="na">name=</span><span class="s">&quot;arg&quot;</span> <span class="na">type=</span><span class="s">&quot;_103&quot;</span> <span class="na">default=</span><span class="s">&quot;0xffffffffffffffffu&quot;</span><span class="nt">/&gt;</span>
</pre></div>
</div>
</li>
<li><p class="first">Example 2</p>
<div class="highlight-c++"><div class="highlight"><pre><span></span><span class="kt">void</span> <span class="nf">fix_function_call</span><span class="p">(</span> <span class="kt">int</span> <span class="n">i</span><span class="o">=</span><span class="n">calc</span><span class="p">(</span> <span class="mi">1</span><span class="p">,</span><span class="mi">2</span><span class="p">,</span><span class="mi">3</span><span class="p">)</span> <span class="p">);</span>
</pre></div>
</div>
<p>GCC-XML 0.7</p>
<div class="highlight-xml"><div class="highlight"><pre><span></span><span class="nt">&lt;Argument</span> <span class="na">name=</span><span class="s">&quot;i&quot;</span> <span class="na">type=</span><span class="s">&quot;_9&quot;</span> <span class="na">default=</span><span class="s">&quot;function_call::calc(int, int, int)(1, 2, 3)&quot;</span><span class="nt">/&gt;</span>
</pre></div>
</div>
<p>GCC-XML 0.9</p>
<div class="highlight-xml"><div class="highlight"><pre><span></span><span class="nt">&lt;Argument</span> <span class="na">name=</span><span class="s">&quot;i&quot;</span> <span class="na">type=</span><span class="s">&quot;_34&quot;</span> <span class="na">default=</span><span class="s">&quot;function_call::calc(1, 2, 3)&quot;</span><span class="nt">/&gt;</span>
</pre></div>
</div>
</li>
<li><p class="first">Example 3</p>
<div class="highlight-c++"><div class="highlight"><pre><span></span><span class="kt">void</span> <span class="nf">typedef__func</span><span class="p">(</span> <span class="k">const</span> <span class="n">typedef_</span><span class="o">::</span><span class="n">alias</span><span class="o">&amp;</span> <span class="n">position</span> <span class="o">=</span> <span class="n">typedef_</span><span class="o">::</span><span class="n">alias</span><span class="p">()</span> <span class="p">);</span>
</pre></div>
</div>
<p>GCC-XML 0.7</p>
<div class="highlight-xml"><div class="highlight"><pre><span></span><span class="nt">&lt;Argument</span> <span class="na">name=</span><span class="s">&quot;position&quot;</span> <span class="na">type=</span><span class="s">&quot;_1458&quot;</span> <span class="na">default=</span><span class="s">&quot;alias()&quot;</span><span class="nt">/&gt;</span>
</pre></div>
</div>
<p>GCC-XML 0.9</p>
<div class="highlight-xml"><div class="highlight"><pre><span></span><span class="nt">&lt;Argument</span> <span class="na">name=</span><span class="s">&quot;position&quot;</span> <span class="na">type=</span><span class="s">&quot;_1703&quot;</span> <span class="na">default=</span><span class="s">&quot;typedef_::original_name()&quot;</span><span class="nt">/&gt;</span>
</pre></div>
</div>
</li>
<li><p class="first">Example 4</p>
<div class="highlight-c++"><div class="highlight"><pre><span></span><span class="kt">void</span> <span class="nf">typedef__func2</span><span class="p">(</span> <span class="k">const</span> <span class="n">typedef_</span><span class="o">::</span><span class="n">alias</span><span class="o">&amp;</span> <span class="n">position</span> <span class="o">=</span> <span class="n">alias</span><span class="p">()</span> <span class="p">);</span>
</pre></div>
</div>
<p>GCC-XML 0.7</p>
<div class="highlight-xml"><div class="highlight"><pre><span></span><span class="nt">&lt;Argument</span> <span class="na">name=</span><span class="s">&quot;position&quot;</span> <span class="na">type=</span><span class="s">&quot;_1458&quot;</span> <span class="na">default=</span><span class="s">&quot;alias()&quot;</span><span class="nt">/&gt;</span>
</pre></div>
</div>
<p>GCC-XML 0.9</p>
<div class="highlight-xml"><div class="highlight"><pre><span></span><span class="nt">&lt;Argument</span> <span class="na">name=</span><span class="s">&quot;position&quot;</span> <span class="na">type=</span><span class="s">&quot;_1703&quot;</span> <span class="na">default=</span><span class="s">&quot;typedef_::original_name()&quot;</span><span class="nt">/&gt;</span>
</pre></div>
</div>
</li>
<li><p class="first">Example 5</p>
<div class="highlight-c++"><div class="highlight"><pre><span></span><span class="n">node</span><span class="o">*</span> <span class="nf">clone_tree</span><span class="p">(</span> <span class="k">const</span> <span class="n">std</span><span class="o">::</span><span class="n">vector</span><span class="o">&lt;</span><span class="n">std</span><span class="o">::</span><span class="n">string</span><span class="o">&gt;</span> <span class="o">&amp;</span><span class="n">types</span><span class="o">=</span><span class="n">std</span><span class="o">::</span><span class="n">vector</span><span class="o">&lt;</span><span class="n">std</span><span class="o">::</span><span class="n">string</span><span class="o">&gt;</span><span class="p">()</span> <span class="p">);</span>
</pre></div>
</div>
<p>GCC-XML 0.7</p>
<div class="highlight-xml"><div class="highlight"><pre><span></span><span class="nt">&lt;Argument</span> <span class="na">name=</span><span class="s">&quot;types&quot;</span> <span class="na">type=</span><span class="s">&quot;_3336&quot;</span> <span class="na">default=</span><span class="s">&quot;vector&amp;lt;std::basic_string&amp;lt;char, std::char_traits&amp;lt;char&amp;gt;, std::allocator&amp;lt;char&amp;gt; &amp;gt;,std::allocator&amp;lt;std::basic_string&amp;lt;char, std::char_traits&amp;lt;char&amp;gt;, std::allocator&amp;lt;char&amp;gt; &amp;gt; &amp;gt; &amp;gt;((&amp;amp;allocator&amp;lt;std::basic_string&amp;lt;char, std::char_traits&amp;lt;char&amp;gt;, std::allocator&amp;lt;char&amp;gt; &amp;gt; &amp;gt;()))&quot;</span><span class="nt">/&gt;</span>
</pre></div>
</div>
<p>GCC-XML 0.9</p>
<div class="highlight-xml"><div class="highlight"><pre><span></span><span class="nt">&lt;Argument</span> <span class="na">name=</span><span class="s">&quot;types&quot;</span> <span class="na">type=</span><span class="s">&quot;_3096&quot;</span> <span class="na">default=</span><span class="s">&quot;std::vector&amp;lt;std::basic_string&amp;lt;char, std::char_traits&amp;lt;char&amp;gt;, std::allocator&amp;lt;char&amp;gt; &amp;gt;, std::allocator&amp;lt;std::basic_string&amp;lt;char, std::char_traits&amp;lt;char&amp;gt;, std::allocator&amp;lt;char&amp;gt; &amp;gt; &amp;gt; &amp;gt;(((const std::allocator&amp;lt;std::basic_string&amp;lt;char, std::char_traits&amp;lt;char&amp;gt;, std::allocator&amp;lt;char&amp;gt; &amp;gt; &amp;gt;&amp;amp;)((const std::allocator&amp;lt;std::basic_string&amp;lt;char, std::char_traits&amp;lt;char&amp;gt;, std::allocator&amp;lt;char&amp;gt; &amp;gt; &amp;gt;*)(&amp;amp; std::allocator&amp;lt;std::basic_string&amp;lt;char, std::char_traits&amp;lt;char&amp;gt;, std::allocator&amp;lt;char&amp;gt; &amp;gt; &amp;gt;()))))&quot;</span><span class="nt">/&gt;</span>
</pre></div>
</div>
</li>
</ul>
<p>Basically pygccxml can&#8217;t help you here. The good news is that you always can
change the default value expression from the script:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="c1">#f is &quot;calldef_t&quot; instance</span>
<span class="k">for</span> <span class="n">arg</span> <span class="ow">in</span> <span class="n">f</span><span class="o">.</span><span class="n">arguments</span><span class="p">:</span>
    <span class="n">arg</span><span class="o">.</span><span class="n">default_value</span> <span class="o">=</span> <span class="o">&lt;&lt;&lt;</span><span class="n">new</span> <span class="n">default</span> <span class="n">value</span> <span class="ow">or</span> <span class="bp">None</span><span class="o">&gt;&gt;&gt;</span>
</pre></div>
</div>
</div>
<div class="section" id="name-mangling">
<h2>Name mangling<a class="headerlink" href="#name-mangling" title="Permalink to this headline"></a></h2>
<p>GCC-XML 0.9 mangles names different than the previous one. This change is the most
dramatic one, because it may require from you to change the code.</p>
<p>Consider the following C++ code:</p>
<div class="highlight-c++"><div class="highlight"><pre><span></span><span class="k">template</span><span class="o">&lt;</span> <span class="kt">unsigned</span> <span class="kt">long</span> <span class="n">i1</span><span class="o">&gt;</span>
<span class="k">struct</span> <span class="n">item_t</span><span class="p">{</span>
  <span class="k">static</span> <span class="k">const</span> <span class="kt">unsigned</span> <span class="kt">long</span> <span class="n">v1</span> <span class="o">=</span> <span class="n">i1</span><span class="p">;</span>
<span class="p">};</span>

<span class="k">struct</span> <span class="n">buggy</span><span class="p">{</span>
  <span class="k">typedef</span> <span class="kt">unsigned</span> <span class="kt">long</span> <span class="n">ulong</span><span class="p">;</span>
  <span class="k">typedef</span> <span class="n">item_t</span><span class="o">&lt;</span> <span class="n">ulong</span><span class="p">(</span> <span class="mh">0xDEECE66DUL</span> <span class="p">)</span> <span class="o">|</span> <span class="p">(</span><span class="n">ulong</span><span class="p">(</span><span class="mh">0x5</span><span class="p">)</span> <span class="o">&lt;&lt;</span> <span class="mi">32</span><span class="p">)</span> <span class="o">&gt;</span> <span class="n">my_item_t</span><span class="p">;</span>
  <span class="n">my_item_t</span> <span class="n">my_item_var</span><span class="p">;</span>
<span class="p">};</span>
</pre></div>
</div>
<table border="1" class="docutils">
<colgroup>
<col width="31%" />
<col width="34%" />
<col width="35%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">generated data</th>
<th class="head">GCC-XML 0.7</th>
<th class="head">GCC-XML 0.9</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td>class name</td>
<td>item_t&lt;0x0deece66d&gt;</td>
<td>item_t&lt;-554899859ul&gt;</td>
</tr>
<tr class="row-odd"><td>class mangled name</td>
<td>6item_tILm3740067437EE</td>
<td>6item_tILm3740067437EE</td>
</tr>
<tr class="row-even"><td>class demangled name</td>
<td>item_t&lt;3740067437l&gt;</td>
<td>item_t&lt;3740067437ul&gt;</td>
</tr>
</tbody>
</table>
<p>pygccxml uses class demangled name as a &#8220;name&#8221; of the class. This was done to
overcome few bugs GCC-XML has, when it works on libraries with extreme usage of
templates.</p>
<p>As you can see the name of the class is different. pygccxml is unable to help
you in such situations. I suggest you to use query API strict mode. This is the
default one. If the class/declaration with the given name could not be found, it
will raise an error with clear description of the problem.</p>
<p>You can also to print the declarations tree to <code class="docutils literal"><span class="pre">stdout</span></code> and find out the name
of the class/declaration from it.</p>
</div>
</div>


           </div>
          </div>
          <footer>
  
    <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
      
      
        <a href="apidocs/utils.html" class="btn btn-neutral" title="pygccxml.utils package" accesskey="p"><span class="fa fa-arrow-circle-left"></span> Previous</a>
      
    </div>
  

  <hr/>

  <div role="contentinfo">
    <p>
        &copy; Copyright 2014-2016, Insight Software Consortium.

    </p>
  </div>
  Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>. 

</footer>

        </div>
      </div>

    </section>

  </div>
  


  

    <script type="text/javascript">
        var DOCUMENTATION_OPTIONS = {
            URL_ROOT:'./',
            VERSION:'1.8.0',
            COLLAPSE_INDEX:false,
            FILE_SUFFIX:'.html',
            HAS_SOURCE:  true
        };
    </script>
      <script type="text/javascript" src="_static/jquery.js"></script>
      <script type="text/javascript" src="_static/underscore.js"></script>
      <script type="text/javascript" src="_static/doctools.js"></script>

  

  
  
    <script type="text/javascript" src="_static/js/theme.js"></script>
  

  
  
  <script type="text/javascript">
      jQuery(function () {
          SphinxRtdTheme.StickyNav.enable();
      });
  </script>
   

</body>
</html>