namespace namespace
Ian Lance Taylor
iant@google.com
Tue Jul 7 17:33:00 GMT 2009
Andrew Haley <aph@redhat.com> writes:
> It turns out that the mangling of C++ keywords used by gcj is completely
> broken:
>
> In particular, when a member name is a C++ keyword, "$" is appended to the
> name. However, this is results in an illegal mangled name so it is not
> possible to refer to the member from CNI code.
>
> Also, the set of C++ keywords in gjavah is different from the set in gcj.
>
> Also, types are not checked for C++ keywords, so javax.xml.namespace.* cannot
> be referenced from CNI code.
>
> This patch fixes the problem.
>
> This is an ABI change. However, the ABI was almost completely broken
> anyway.
Does this require any changes to the demangler? Note that the demangler
currently has a special case for this:
/* A Java mangled name may have a trailing '$' if it is a C++
keyword. This '$' is not included in the length count. We just
ignore the '$'. */
if ((di->options & DMGL_JAVA) != 0
&& d_peek_char (di) == '$')
d_advance (di, 1);
Ian
More information about the Gcc-patches
mailing list