Ian Lance Taylor <ian@airs.com> writes:
TJ Laurenzo <tlaurenzo@gmail.com> writes:
The attached patch corrects PR9861 by including the return type in
mangled names in the C++ and Java compilers for Java class methods.
This changes the ABI for Java types but does not make any changes to
C++ programs that do not access Java types.
How is the demangler going to work with this patch? Is there any way
for the demangler to determine which names are Java names and which
are C++ names? I don't see any obvious way, though I haven't looked
that hard.
By the way, considering the demangler is not an unimportant point as
any ambiguity in demangling is an ambiguity that can be happen when
linking C++ and Java code together. For example, your proposed
mangling for
java.lang.Math.acos(double)
appears to be
_ZN4java4lang4Math4acosEdd
which is the mangled name which will be used for the C++ function
java::lang::Math::acos(double, double)