[C++-sig] Re: Adding documentation

Ralf W. Grosse-Kunstleve rwgk at yahoo.com
Thu May 13 11:18:40 CEST 2004


--- David Abrahams <dave at boost-consulting.com> wrote:
> We're using the builtin facilities provided by the GCC runtime to
> demangle those strings.  The only expanation I can imagine is that I
> got the meaning of __GNUC_MINOR__ wrong:
> 
>   #  ifndef BOOST_PYTHON_HAVE_GCC_CP_DEMANGLE
>   #   if defined(__GNUC__)                                                \
>       && ((__GNUC__ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1)))   \
>       && !defined(__EDG_VERSION__)
>   #    define BOOST_PYTHON_HAVE_GCC_CP_DEMANGLE
>   #   endif
>   #  endif
> 
> Isn't that the part of the version number after the first decimal
> point?

I think your interpretation of the macros is correct, e.g.:

__GNUC__ = 3
__GNUC_MINOR__ = 4
__GNUC_PATCHLEVEL__ = 0

Some observations:

Unmangling works correctly under Redhat 8.0 gcc3.2, Redhat WS3 gcc 3.2.3, Mac
OS 10.3 gcc 3.3. User-defined types (incl. std::string etc.) are also unmangled
correctly with gcc 3.4.0 (under Redhat 8.0) but the builtin types are not
unmangled.

With regards to name unmangling, is there a distinction anywhere in
Boost.Python between user-defined types and builtin types? If not the strange
behavior must be a feature of gcc 3.4.0 in which case I should probably file a
bug report.

Ralf


__________________________________
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard
http://antispam.yahoo.com/whatsnewfree




More information about the Cplusplus-sig mailing list