[GCC-XML] internal compiler error
Jakub Zytka
kubol at kormoran.net
Fri Mar 19 07:40:53 EDT 2010
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<__typeof__ (*
getContainer(static_cast<T*>(0)))>" 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<__typeof__ (*
getContainer(static_cast<T*>(0)))>" 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
More information about the gccxml
mailing list