Hi

I've filled a bug: http://www.itk.org/Bug/view.php?id=10440, but perhaps someone could give me some hint.

I've got a code (actually, this is a simplified example):

struct Foo {};
struct FooContainer {};
FooContainer* getContainer(Foo *);

template <typename T>
struct SelfType
{
        typedef T Type;
};

template<typename T>
void f(T e)
{
typedef typename SelfType<typeof(*getContainer(static_cast<T*>(0)))>::Type Container;
}

Parsing it with gccxml yields internal compiler error. The last line of xml is:

<Struct id="_97" name="SelfType&lt;__typeof__ (* getContainer(static_cast&lt;T*&gt;(0)))&gt;" context="_1" incomplete="1"

It seems gccxml is unable to create mangled name for the Container type. If i modify gccxml to create fake mangled name, instead of exiting with error, the code gets parsed all right, and in the xml i got:

<Struct id="_97" name="SelfType&lt;__typeof__ (* getContainer(static_cast&lt;T*&gt;(0)))&gt;" context="_1" incomplete="1" mangled="SomeFakeName"
 location="f1:7" file="f1" line="7" artificial="1" align="8"/>

What are the possible consequences of such modification? I mean - what are the requirements for the mangled name? Is it enough to provide some bijection from the actual type to the mangled name, or does the mangled name have to adhere to some format and so on? I use gccxml to provide input to py++

regards,
Kuba

_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://www.gccxml.org/mailman/listinfo/gccxml

Reply via email to