Revision: 1208
http://pygccxml.svn.sourceforge.net/pygccxml/?rev=1208&view=rev
Author: roman_yakovenko
Date: 2007-12-24 07:34:46 -0800 (Mon, 24 Dec 2007)
Log Message:
-----------
Added Paths:
-----------
pygccxml_dev/docs/upgrade_issues.rest
Added: pygccxml_dev/docs/upgrade_issues.rest
===================================================================
--- pygccxml_dev/docs/upgrade_issues.rest (rev 0)
+++ pygccxml_dev/docs/upgrade_issues.rest 2007-12-24 15:34:46 UTC (rev 1208)
@@ -0,0 +1,224 @@
+=================================
+GCC-XML 0.7 -> 0.9 upgrade issues
+=================================
+
+.. contents:: Table of contents
+
+------------
+Introduction
+------------
+
+Recently, GCC-XML internal parser was updated to GCC 4.2. The internal representation
+of source code, provided by GCC'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.
+
+
+-------------------
+Default constructor
+-------------------
+
+GCC-XML 0.9 doesn't report compiler generated default and copy constructors as
+an implicit ones.
+
+If you rely havily on their existence in the generated XML, I suggest you to swith
+to `type_traits.has_trivial_constructor`_/`type_traits.has_trivial_copy`_ functions.
+
+.. _`type_traits.has_trivial_constructor` : ./apidocs/pygccxml.declarations.type_traits-pysrc.html#has_trivial_constructor
+.. _`type_traits.has_trivial_copy` : ./apidocs/pygccxml.declarations.type_traits-pysrc.html#has_trivial_copy
+
+
+--------------------------
+Pointer to member variable
+--------------------------
+
+Previous version of GCC-XML reported pointer to member variable as a "PointerType"
+with reference to "OffsetType". The new version removes "PointerType" from this sequence.
+
+C++ code:
+
+.. code-block:: C++
+
+ struct xyz_t{
+ int do_smth( double );
+ int m_some_member;
+ };
+
+ typedef int (xyz_t::*mfun_ptr_t)( double );
+
+ typedef int (xyz_t::*mvar_ptr_t);
+
+GCC-XML 0.7:
+
+.. code-block:: XML
+
+ <Typedef id="_6" name="mfun_ptr_t" type="_5" />
+ <PointerType id="_5" type="_128" size="32" align="32"/>
+ <MethodType id="_128" basetype="_7" returns="_136">
+ <Argument type="_140"/>
+ </MethodType>
+
+ <Typedef id="_4" name="mvar_ptr_t" type="_3" />
+ <PointerType id="_3" type="_127" size="32" align="32"/>
+ <OffsetType id="_127" basetype="_7" type="_136" size="32" align="32"/>
+
+GCC-XML 0.9:
+
+.. code-block:: XML
+
+ <Typedef id="_97" name="mfun_ptr_t" type="_96" />
+ <PointerType id="_96" type="_147" size="32" align="32"/>
+ <MethodType id="_147" basetype="_92" returns="_131">
+ <Argument type="_127"/>
+ </MethodType>
+
+ <Typedef id="_52" name="mvar_ptr_t" type="_139" />
+ <OffsetType id="_139" basetype="_92" type="_131" size="32" align="32"/>
+
+`pygccxml`_ handles this problem automatically, you don't have to change your code.
+
+-----------------------
+Constant variable value
+-----------------------
+
+GCC-XML 0.9 uses suffix to report the constant variable value
+
+For example:
+
+.. code-block:: C++
+
+ const long unsigned int initialized = 10122004;
+
+GCC-XML 0.9 will report the ``initialized`` value as ``10122004ul``, while GCC-XML
+0.7 as ``10122004``.
+
+`pygccxml`_ handles this problem automatically, you don't have to change your code.
+
+------------------------------------------
+Free and member function default arguments
+------------------------------------------
+
+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 next examples:
+
+*
+ .. code-block:: C++
+
+ void fix_numeric( ull arg=(ull)-1 );
+
+ GCC-XML 0.7
+
+ .. code-block:: XML
+
+ <Argument name="arg" type="_7" default="0xffffffffffffffff"/>
+
+
+ GCC-XML 0.9
+
+ .. code-block:: XML
+
+ <Argument name="arg" type="_103" default="0xffffffffffffffffu"/>
+
+*
+ .. code-block:: C++
+
+ void fix_function_call( int i=calc( 1,2,3) );
+
+ GCC-XML 0.7
+
+ .. code-block:: XML
+
+ <Argument name="i" type="_9" default="function_call::calc(int, int, int)(1, 2, 3)"/>
+
+
+ GCC-XML 0.9
+
+ .. code-block:: XML
+
+ <Argument name="i" type="_34" default="function_call::calc(1, 2, 3)"/>
+
+*
+ .. code-block:: C++
+
+ void typedef__func( const typedef_::alias& position = typedef_::alias() );
+
+ GCC-XML 0.7
+
+ .. code-block:: XML
+
+ <Argument name="position" type="_1458" default="alias()"/>
+
+
+ GCC-XML 0.9
+
+ .. code-block:: XML
+
+ <Argument name="position" type="_1703" default="typedef_::original_name()"/>
+
+*
+ .. code-block:: C++
+
+ void typedef__func2( const typedef_::alias& position = alias() );
+
+ GCC-XML 0.7
+
+ .. code-block:: XML
+
+ <Argument name="position" type="_1458" default="alias()"/>
+
+
+ GCC-XML 0.9
+
+ .. code-block:: XML
+
+ <Argument name="position" type="_1703" default="typedef_::original_name()"/>
+
+
+*
+ .. code-block:: C++
+
+ node* clone_tree( const std::vector<std::string> &types=std::vector<std::string>() );
+
+ GCC-XML 0.7
+
+ .. code-block:: XML
+
+ <Argument name="types" type="_3336" default="vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> >,std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >((&allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >()))"/>
+
+
+ GCC-XML 0.9
+
+ .. code-block:: XML
+
+ <Argument name="types" type="_3096" default="std::vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >(((const std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >&)((const std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >*)(& std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >()))))"/>
+
+
+-------------
+Name mangling
+-------------
+
+GCC-XML 0.9 manlges names different than the previous one.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+.. _`pygccxml`: ./pygccxml.html
+.. _`Python`: http://www.python.org
+.. _`GCC-XML`: http://www.gccxml.org
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|